refactor: move test utils to package (#3206)

This commit is contained in:
Alex Yang
2023-07-13 17:05:01 +08:00
committed by GitHub
parent 4f5ed30298
commit 0230cea16e
61 changed files with 199 additions and 551 deletions
+4
View File
@@ -2,10 +2,14 @@ import { expect, test } from 'vitest';
test('compare config', async () => {
const { default: nextConfigMock } = await import(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
'../../scripts/vitest/next-config-mock'
);
const mockConfig = nextConfigMock().publicRuntimeConfig;
const { default: nextConfig } = await import(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
'../../apps/web/next.config.mjs'
);
const config = nextConfig.publicRuntimeConfig;
+8
View File
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "..",
"noEmit": true
},
"include": ["**.spec.ts"]
}