Skip to content

Commit 1e2e881

Browse files
test: change test to waitUntil for render (#16)
1 parent 9d5e1a4 commit 1e2e881

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/api-body-document.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { fixture, assert, nextFrame, aTimeout } from '@open-wc/testing';
1+
import { fixture, assert, nextFrame, aTimeout, waitUntil } from '@open-wc/testing';
22
import { AmfLoader } from './amf-loader.js';
33
import '../api-body-document.js';
44

@@ -559,8 +559,8 @@ describe('ApiBodyDocumentElement', () => {
559559
await aTimeout(0);
560560
});
561561

562-
it('Renders api-type-document for anyOf payload', () => {
563-
assert.exists(element.shadowRoot.querySelector('api-type-document'));
562+
it('Renders api-type-document for anyOf payload', async () => {
563+
await waitUntil(() => !!element.shadowRoot.querySelector('api-type-document'), 'api-type-document should render', { timeout: 1000 });
564564
});
565565
});
566566
});

0 commit comments

Comments
 (0)