use aTimeout to wait

This commit is contained in:
Jacob Overgaard
2023-07-27 13:02:49 +02:00
parent 3019f5a513
commit 1d12ea996f

View File

@@ -1,4 +1,4 @@
import { expect, fixture, html } from '@open-wc/testing';
import { aTimeout, expect, fixture, html } from '@open-wc/testing';
import { UmbLocalizeElement } from './localize.element.js';
import {
UMB_LOCALIZATION_CONTEXT,
@@ -8,7 +8,6 @@ import {
import { UmbExtensionRegistry } from '@umbraco-cms/backoffice/extension-api';
import '@umbraco-cms/backoffice/context-api';
import { sleep } from '@umbraco-cms/internal/test-utils';
const english = {
type: 'translations',
@@ -92,7 +91,7 @@ describe('umb-localize', () => {
context.setLanguage(danish.meta.culture);
await element.updateComplete;
await sleep(0);
await aTimeout(0);
expect(element.shadowRoot?.innerHTML).to.contain('Luk');
});