Skip to content

Commit 326a8dd

Browse files
Remove fast-check alias from Vitest config, rely on node_modules resolution
The temp test directories are under website/.test-artifacts/, so Node module resolution walks up to website/node_modules/fast-check (workspace symlink). No alias needed — same as the original Jest approach. Co-authored-by: Nicolas DUBIEN <[email protected]>
1 parent 452c3ba commit 326a8dd

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

website/docs/tutorials/detect-race-conditions/snippets.spec.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ const generatedTestsDirectory = path.join(rootWebsite, generatedTestsDirectoryNa
1313

1414
const vitestBinaryPath = path.join(rootWebsite, './node_modules/vitest/vitest.mjs');
1515
const vitestConfigName = 'vitest.config.mjs';
16-
const fastCheckSourcePath = path.join(rootWebsite, '..', 'packages', 'fast-check', 'src', 'fast-check.ts');
1716

1817
const allQueueSpecs = {
1918
unit: snippets.queueUnitSpecCode,
@@ -81,8 +80,7 @@ describe('Playground', () => {
8180
await fs.writeFile(specFilePath, sanitizedSpecCode);
8281
await fs.writeFile(
8382
vitestConfigPath,
84-
`import { defineConfig } from 'vitest/config';\n` +
85-
`export default defineConfig({ test: { include: ['queue.spec.mjs'] }, resolve: { alias: { 'fast-check': ${JSON.stringify(fastCheckSourcePath)} } } });`,
83+
`import { defineConfig } from 'vitest/config';\nexport default defineConfig({ test: { include: ['queue.spec.mjs'] } });`,
8684
);
8785
const specOutput = await runVitest(testDirectoryPath);
8886
if (expectedSuccess) {

0 commit comments

Comments
 (0)