From 3990d034e352a2cdbb13704d8aac6f89e3417f4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Sun, 18 Apr 2021 23:14:33 +0200 Subject: [PATCH] test: add extension option test --- .../integration/core/extensionOptions.spec.ts | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/cypress/integration/core/extensionOptions.spec.ts b/tests/cypress/integration/core/extensionOptions.spec.ts index 96a05fed..4f893cfc 100644 --- a/tests/cypress/integration/core/extensionOptions.spec.ts +++ b/tests/cypress/integration/core/extensionOptions.spec.ts @@ -92,4 +92,30 @@ describe('extension options', () => { 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', + }, + }) + }) })