Skip to content

Commit b90b3e9

Browse files
build(config): run tests with Vitest
1 parent 9dd9515 commit b90b3e9

File tree

164 files changed

+20819
-22863
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+20819
-22863
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ jobs:
1515
strategy:
1616
matrix:
1717
include:
18-
- node-version: 20.x
19-
target: chrome
20-
type: expectation
2118
- node-version: 20.x
2219
target: chrome
2320
type: integration
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { use } from 'chai';
2+
import sinonChai from 'sinon-chai';
3+
4+
use(sinonChai);
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { webdriverio } from '@vitest/browser-webdriverio';
2+
import { defineConfig } from 'vitest/config';
3+
4+
export default defineConfig({
5+
test: {
6+
bail: 1,
7+
browser: {
8+
enabled: true,
9+
instances: [
10+
{
11+
browser: 'chrome',
12+
headless: true,
13+
name: 'Chrome Canary',
14+
provider: webdriverio({
15+
capabilities: {
16+
'goog:chromeOptions': {
17+
args: ['--autoplay-policy=no-user-gesture-required'],
18+
binary: '/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary'
19+
}
20+
}
21+
})
22+
}
23+
]
24+
},
25+
dir: 'test/expectation/chrome/canary/',
26+
include: ['**/*.js'],
27+
setupFiles: ['config/vitest/expectation-chrome-canary-setup.ts'],
28+
watch: false
29+
}
30+
});
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { use } from 'chai';
2+
import sinonChai from 'sinon-chai';
3+
4+
use(sinonChai);
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { webdriverio } from '@vitest/browser-webdriverio';
2+
import { defineConfig } from 'vitest/config';
3+
4+
export default defineConfig({
5+
test: {
6+
bail: 1,
7+
browser: {
8+
enabled: true,
9+
instances: [
10+
{
11+
browser: 'chrome',
12+
headless: true,
13+
name: 'Chrome',
14+
provider: webdriverio({
15+
capabilities: { 'goog:chromeOptions': { args: ['--autoplay-policy=no-user-gesture-required'] } }
16+
})
17+
}
18+
]
19+
},
20+
dir: 'test/expectation/chrome/current/',
21+
include: ['**/*.js'],
22+
setupFiles: ['config/vitest/expectation-chrome-current-setup.ts'],
23+
watch: false
24+
}
25+
});
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { use } from 'chai';
2+
import sinonChai from 'sinon-chai';
3+
4+
use(sinonChai);
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { webdriverio } from '@vitest/browser-webdriverio';
2+
import { defineConfig } from 'vitest/config';
3+
4+
export default defineConfig({
5+
test: {
6+
bail: 1,
7+
browser: {
8+
enabled: true,
9+
instances: [
10+
{
11+
browser: 'chrome',
12+
headless: true,
13+
name: 'Chrome',
14+
provider: webdriverio({
15+
capabilities: {
16+
'goog:chromeOptions': {
17+
args: ['--autoplay-policy=no-user-gesture-required'],
18+
binary: 'chromium-v141/chrome-mac/Chromium.app/Contents/MacOS/Chromium'
19+
}
20+
}
21+
})
22+
}
23+
]
24+
},
25+
dir: 'test/expectation/chrome/penultimate/',
26+
include: ['**/*.js'],
27+
setupFiles: ['config/vitest/expectation-chrome-penultimate-setup.ts'],
28+
watch: false
29+
}
30+
});
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { use } from 'chai';
2+
import sinonChai from 'sinon-chai';
3+
4+
use(sinonChai);
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { webdriverio } from '@vitest/browser-webdriverio';
2+
import { defineConfig } from 'vitest/config';
3+
4+
export default defineConfig({
5+
test: {
6+
bail: 1,
7+
browser: {
8+
enabled: true,
9+
instances: [
10+
{
11+
browser: 'chrome',
12+
headless: true,
13+
name: 'Chrome',
14+
provider: webdriverio({
15+
capabilities: {
16+
'goog:chromeOptions': {
17+
args: ['--autoplay-policy=no-user-gesture-required'],
18+
binary: 'chromium-v142/chrome-mac/Chromium.app/Contents/MacOS/Chromium'
19+
}
20+
}
21+
})
22+
}
23+
]
24+
},
25+
dir: 'test/expectation/chrome/previous/',
26+
include: ['**/*.js'],
27+
setupFiles: ['config/vitest/expectation-chrome-previous-setup.ts'],
28+
watch: false
29+
}
30+
});
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { use } from 'chai';
2+
import sinonChai from 'sinon-chai';
3+
4+
use(sinonChai);

0 commit comments

Comments
 (0)