From 1b953c44307c6b38fffc5f7756d1519cea2fc5aa Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Tue, 9 Aug 2022 15:42:05 +0200 Subject: [PATCH] add correct await usage for chai accessible() --- .../src/installer/installer.test.ts | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/installer/installer.test.ts b/src/Umbraco.Web.UI.Client/src/installer/installer.test.ts index 56b019d8b6..a93083013c 100644 --- a/src/Umbraco.Web.UI.Client/src/installer/installer.test.ts +++ b/src/Umbraco.Web.UI.Client/src/installer/installer.test.ts @@ -1,4 +1,7 @@ -import { html, fixture, expect } from '@open-wc/testing'; +import '.'; + +import { expect, fixture, html } from '@open-wc/testing'; + import { UmbInstallerConsent } from './installer-consent.element'; import { UmbInstallerDatabase } from './installer-database.element'; import { UmbInstallerInstalling } from './installer-installing.element'; @@ -13,12 +16,12 @@ describe('UmbInstaller', () => { element = await fixture(html``); }); - it('is defined with its own instance', async () => { + it('is defined with its own instance', () => { expect(element).to.be.instanceOf(UmbInstaller); }); it('passes the a11y audit', async () => { - expect(element).shadowDom.to.be.accessible(); + await expect(element).shadowDom.to.be.accessible(); }); }); @@ -29,12 +32,12 @@ describe('UmbInstallerLayout', () => { element = await fixture(html``); }); - it('is defined with its own instance', async () => { + it('is defined with its own instance', () => { expect(element).to.be.instanceOf(UmbInstallerLayout); }); it('passes the a11y audit', async () => { - expect(element).shadowDom.to.be.accessible(); + await expect(element).shadowDom.to.be.accessible(); }); }); @@ -45,12 +48,12 @@ describe('UmbInstallerUser', () => { element = await fixture(html``); }); - it('is defined with its own instance', async () => { + it('is defined with its own instance', () => { expect(element).to.be.instanceOf(UmbInstallerUser); }); it('passes the a11y audit', async () => { - expect(element).shadowDom.to.be.accessible(); + await expect(element).to.be.accessible(); }); }); @@ -61,12 +64,12 @@ describe('UmbInstallerConsent', () => { element = await fixture(html``); }); - it('is defined with its own instance', async () => { + it('is defined with its own instance', () => { expect(element).to.be.instanceOf(UmbInstallerConsent); }); it('passes the a11y audit', async () => { - expect(element).shadowDom.to.be.accessible(); + await expect(element).shadowDom.to.be.accessible(); }); }); @@ -77,12 +80,12 @@ describe('UmbInstallerDatabase', () => { element = await fixture(html``); }); - it('is defined with its own instance', async () => { + it('is defined with its own instance', () => { expect(element).to.be.instanceOf(UmbInstallerDatabase); }); it('passes the a11y audit', async () => { - expect(element).shadowDom.to.be.accessible(); + await expect(element).shadowDom.to.be.accessible(); }); }); @@ -93,11 +96,11 @@ describe('UmbInstallerInstalling', () => { element = await fixture(html``); }); - it('is defined with its own instance', async () => { + it('is defined with its own instance', () => { expect(element).to.be.instanceOf(UmbInstallerInstalling); }); it('passes the a11y audit', async () => { - expect(element).shadowDom.to.be.accessible(); + await expect(element).shadowDom.to.be.accessible(); }); });