Update expo application
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
import { jsdomProject, nodeProject } from '@spoon/vitest-config';
|
||||
|
||||
const srcRoot = fileURLToPath(new URL('./src', import.meta.url));
|
||||
const setupFile = fileURLToPath(new URL('./tests/setup.ts', import.meta.url));
|
||||
const alias = {
|
||||
'~': srcRoot,
|
||||
'~/': `${srcRoot}/`,
|
||||
};
|
||||
|
||||
const componentProject = jsdomProject('component', [
|
||||
'tests/component/**/*.test.{ts,tsx}',
|
||||
]);
|
||||
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
alias,
|
||||
},
|
||||
test: {
|
||||
projects: [
|
||||
nodeProject('unit', ['tests/unit/**/*.test.{ts,tsx}']),
|
||||
nodeProject('integration', ['tests/integration/**/*.test.{ts,tsx}']),
|
||||
{
|
||||
...componentProject,
|
||||
resolve: { alias },
|
||||
test: {
|
||||
...componentProject.test,
|
||||
setupFiles: [setupFile],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user