Skip to content

Commit f59f4f6

Browse files
committed
Working around Turbo issue
1 parent 13c7431 commit f59f4f6

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

src/Chartjs/assets/vitest.config.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@ import { defineConfig, mergeConfig } from 'vitest/config';
22
import configShared from '../../../vitest.config.js'
33
import path from 'path';
44

5-
// defineConfig({
6-
// test: {
7-
8-
// }
9-
// })
105
export default mergeConfig(
116
configShared,
12-
{
7+
defineConfig({
138
test: {
149
setupFiles: [path.join(__dirname, 'test', 'setup.js')],
1510
deps: {
@@ -20,5 +15,5 @@ export default mergeConfig(
2015
},
2116
},
2217
}
23-
}
18+
})
2419
);

src/Turbo/assets/test/setup.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* This file is part of the Symfony package.
3+
*
4+
* (c) Fabien Potencier <[email protected]>
5+
*
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
9+
10+
// polyfill for some odd error inside of Turbo in the test environment
11+
window.SubmitEvent = function() {};

src/Turbo/assets/vitest.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig, mergeConfig } from 'vitest/config';
2+
import configShared from '../../../vitest.config.js'
3+
import path from 'path';
4+
5+
export default mergeConfig(
6+
configShared,
7+
defineConfig({
8+
test: {
9+
setupFiles: [path.join(__dirname, 'test', 'setup.js')],
10+
}
11+
})
12+
);

0 commit comments

Comments
 (0)