diff --git a/app-min/test__if_not_no-unit-tests/my-app.spec.ext b/app-min/test__if_not_no-unit-tests/my-app.spec.ext
index 8bb0597..b0b42cd 100644
--- a/app-min/test__if_not_no-unit-tests/my-app.spec.ext
+++ b/app-min/test__if_not_no-unit-tests/my-app.spec.ext
@@ -3,25 +3,17 @@ import { describe, it } from 'vitest';
// @endif
import { MyApp } from '../src/my-app';
import { createFixture } from '@aurelia/testing';
-// @if jest
-import { bootstrapTestEnvironment } from './setup';
-
-beforeAll(bootstrapTestEnvironment);
-// @endif
+import './setup';
describe('my-app', () => {
it('should render message', async () => {
- const { assertText, startPromise, stop } = createFixture(
+ const { assertText, startPromise } = createFixture(
'',
{},
[MyApp],
);
- try {
- await startPromise;
- assertText('Hello World!', { compact: true });
- } finally {
- await stop(true);
- }
+ await startPromise;
+ assertText('Hello World!', { compact: true });
});
});
diff --git a/common/test__if_not_no-unit-tests/setup.ext b/common/test__if_not_no-unit-tests/setup.ext
index d4f84d2..20b533f 100644
--- a/common/test__if_not_no-unit-tests/setup.ext
+++ b/common/test__if_not_no-unit-tests/setup.ext
@@ -1,16 +1,25 @@
import { BrowserPlatform } from '@aurelia/platform-browser';
-import { setPlatform } from '@aurelia/testing';
-
-// Sets up the Aurelia environment for testing
+import { setPlatform, onFixtureCreated/* @if typescript */, type IFixture/* @endif */ } from '@aurelia/testing';
// @if vitest
-const platform = new BrowserPlatform(window);
-setPlatform(platform);
-BrowserPlatform.set(globalThis, platform);
+import { beforeAll, afterEach } from 'vitest';
// @endif
-// @if jest
-export function bootstrapTestEnvironment() {
+
+// Sets up the Aurelia environment for testing
+function bootstrapTextEnv() {
const platform = new BrowserPlatform(window);
setPlatform(platform);
BrowserPlatform.set(globalThis, platform);
}
-// @endif
+
+const fixtures/* @if typescript */: IFixture