Skip to content

Commit 72fc042

Browse files
committed
refactor(plugin-axe): update to v0.85.0 and centralized test configs
1 parent d170167 commit 72fc042

File tree

4 files changed

+10
-79
lines changed

4 files changed

+10
-79
lines changed
Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
1-
/// <reference types="vitest" />
2-
import { defineConfig } from 'vitest/config';
3-
import { tsconfigPathAliases } from '../../tools/vitest-tsconfig-path-aliases.js';
1+
import { createE2ETestConfig } from '../../testing/test-setup-config/src/index.js';
42

5-
export default defineConfig({
6-
cacheDir: '../../node_modules/.vite/plugin-axe-e2e',
7-
test: {
8-
reporters: ['basic'],
9-
testTimeout: 80_000,
10-
globals: true,
11-
alias: tsconfigPathAliases(),
12-
pool: 'threads',
13-
poolOptions: { threads: { singleThread: true } },
14-
cache: {
15-
dir: '../../node_modules/.vitest',
16-
},
17-
environment: 'node',
18-
include: ['tests/**/*.e2e.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
19-
setupFiles: ['../../testing/test-setup/src/lib/reset.mocks.ts'],
20-
},
3+
export default createE2ETestConfig('ci-e2e', {
4+
testTimeout: 80_000,
215
});

packages/plugin-axe/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code-pushup/axe-plugin",
3-
"version": "0.84.0",
3+
"version": "0.85.0",
44
"license": "MIT",
55
"description": "Code PushUp plugin for detecting accessibility issues using Axe 🌐",
66
"homepage": "https://github.com/code-pushup/cli/tree/main/packages/plugin-axe#readme",
@@ -45,8 +45,8 @@
4545
},
4646
"dependencies": {
4747
"@axe-core/playwright": "^4.11.0",
48-
"@code-pushup/models": "0.84.0",
49-
"@code-pushup/utils": "0.84.0",
48+
"@code-pushup/models": "0.85.0",
49+
"@code-pushup/utils": "0.85.0",
5050
"axe-core": "^4.11.0",
5151
"zod": "^4.1.12"
5252
},
Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,3 @@
1-
/// <reference types="vitest" />
2-
import { defineConfig } from 'vitest/config';
3-
import { tsconfigPathAliases } from '../../tools/vitest-tsconfig-path-aliases.js';
1+
import { createIntTestConfig } from '../../testing/test-setup-config/src/index.js';
42

5-
export default defineConfig({
6-
cacheDir: '../../node_modules/.vite/plugin-axe',
7-
test: {
8-
reporters: ['basic'],
9-
globals: true,
10-
cache: {
11-
dir: '../../node_modules/.vitest',
12-
},
13-
alias: tsconfigPathAliases(),
14-
pool: 'threads',
15-
poolOptions: { threads: { singleThread: true } },
16-
coverage: {
17-
reporter: ['text', 'lcov'],
18-
reportsDirectory: '../../coverage/plugin-axe/int-tests',
19-
exclude: ['mocks/**', 'vitest.{unit,int}.config.ts'],
20-
},
21-
environment: 'node',
22-
include: ['src/**/*.int.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
23-
globalSetup: ['../../global-setup.ts'],
24-
setupFiles: [
25-
'../../testing/test-setup/src/lib/console.mock.ts',
26-
'../../testing/test-setup/src/lib/logger.mock.ts',
27-
'../../testing/test-setup/src/lib/reset.mocks.ts',
28-
],
29-
},
30-
});
3+
export default createIntTestConfig('plugin-axe');
Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,3 @@
1-
/// <reference types="vitest" />
2-
import { defineConfig } from 'vitest/config';
3-
import { tsconfigPathAliases } from '../../tools/vitest-tsconfig-path-aliases.js';
1+
import { createUnitTestConfig } from '../../testing/test-setup-config/src/index.js';
42

5-
export default defineConfig({
6-
cacheDir: '../../node_modules/.vite/plugin-axe',
7-
test: {
8-
reporters: ['basic'],
9-
globals: true,
10-
cache: {
11-
dir: '../../node_modules/.vitest',
12-
},
13-
alias: tsconfigPathAliases(),
14-
pool: 'threads',
15-
poolOptions: { threads: { singleThread: true } },
16-
coverage: {
17-
reporter: ['text', 'lcov'],
18-
reportsDirectory: '../../coverage/plugin-axe/unit-tests',
19-
exclude: ['mocks/**', 'vitest.{unit,int}.config.ts'],
20-
},
21-
environment: 'node',
22-
include: ['src/**/*.unit.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
23-
globalSetup: ['../../global-setup.ts'],
24-
setupFiles: [
25-
'../../testing/test-setup/src/lib/console.mock.ts',
26-
'../../testing/test-setup/src/lib/reset.mocks.ts',
27-
],
28-
},
29-
});
3+
export default createUnitTestConfig('plugin-axe');

0 commit comments

Comments
 (0)