Skip to content

Commit a1d2b80

Browse files
committed
Add failing test for button type=other
1 parent d33d275 commit a1d2b80

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Diff for: test/index.js

+28
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,34 @@ test('fromParse5', async function (t) {
245245
}
246246
)
247247
})
248+
249+
await t.test('should handle unknown attributes', async function () {
250+
assert.deepEqual(
251+
fromParse5(parseFragment('<button type="other" disabled>Hello</button>')),
252+
{
253+
type: 'root',
254+
children: [
255+
{
256+
type: 'element',
257+
tagName: 'button',
258+
properties: {
259+
type: 'other',
260+
disabled: true
261+
},
262+
children: [
263+
{
264+
type: 'text',
265+
value: 'Hello'
266+
}
267+
]
268+
}
269+
],
270+
data: {
271+
quirksMode: false
272+
}
273+
}
274+
)
275+
})
248276
})
249277

250278
test('fixtures', async function (t) {

0 commit comments

Comments
 (0)