test: add extension option test

This commit is contained in:
Philipp Kühn
2021-04-18 23:14:33 +02:00
parent d1e2ee6f33
commit 3990d034e3

View File

@@ -92,4 +92,30 @@ describe('extension options', () => {
baz: 1, baz: 1,
}) })
}) })
it('should configure nested objects', () => {
const extension = Extension
.create({
defaultOptions: {
foo: [1, 2, 3],
HTMLAttributes: {
class: 'foo',
},
},
})
.configure({
foo: [1],
HTMLAttributes: {
id: 'bar',
},
})
expect(extension.options).to.deep.eq({
foo: [1],
HTMLAttributes: {
class: 'foo',
id: 'bar',
},
})
})
}) })