Skip to content

Commit 17a778b

Browse files
committed
Ensure promise rejection on 406
1 parent 6dc7867 commit 17a778b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,20 @@ suite('include-fragment-element', function() {
210210
)
211211
})
212212

213+
test('throws on 406', function() {
214+
const el = document.createElement('include-fragment')
215+
el.setAttribute('src', '/fragment')
216+
217+
return el.data.then(
218+
() => {
219+
assert.ok(false)
220+
},
221+
error => {
222+
assert.match(error, /the server responded with a status of 406/)
223+
}
224+
)
225+
})
226+
213227
test('data is not writable', function() {
214228
const el = document.createElement('include-fragment')
215229
assert.ok(el.data !== 42)

0 commit comments

Comments
 (0)