-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.test.ts
More file actions
22 lines (18 loc) · 638 Bytes
/
run.test.ts
File metadata and controls
22 lines (18 loc) · 638 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { assert, poku } from 'poku';
import { reactTestingPlugin } from './src/plugin.ts';
// isolation: 'none' — test files run in the same process; suites must be sequential
const happyCode = await poku('tests', {
noExit: true,
isolation: 'none',
plugins: [reactTestingPlugin({ dom: 'happy-dom' })],
});
assert.strictEqual(happyCode, 0, 'happy-dom suite');
// jsdom is not compatible with Deno
if (typeof Deno === 'undefined') {
const jsdomCode = await poku('tests', {
noExit: true,
isolation: 'none',
plugins: [reactTestingPlugin({ dom: 'jsdom' })],
});
assert.strictEqual(jsdomCode, 0, 'jsdom suite');
}