Skip to content

Commit 374ae6c

Browse files
authored
Make test teardown in __init.test.js synchronous (#5477)
Co-authored-by: Noeri Huisman <mrxz@users.noreply.github.com>
1 parent c16cd8f commit 374ae6c

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

‎tests/__init.test.js‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ window.addEventListener('unhandledrejection', event => {
8282
pendingErrorNotice = 'An uncaught promise rejection occurred between tests';
8383
});
8484

85-
teardown(function (done) {
85+
teardown(function () {
8686
// Clean up any attached elements.
8787
var attachedEls = ['canvas', 'a-assets', 'a-scene'];
8888
var els = document.querySelectorAll(attachedEls.join(','));
@@ -93,11 +93,6 @@ teardown(function (done) {
9393
delete AFRAME.components.test;
9494
delete AFRAME.systems.test;
9595

96-
// Allow detachedCallbacks to clean themselves up.
97-
setTimeout(function () {
98-
done();
99-
});
100-
10196
if (pendingError) {
10297
console.error(pendingErrorNotice);
10398
throw pendingError;

0 commit comments

Comments
 (0)