Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ”§(vitest) Migrate jest to esm #4603

Merged
merged 2 commits into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .yarn/versions/7a5e69e8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declined:
- "@fast-check/vitest"
2 changes: 1 addition & 1 deletion packages/vitest/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript'],
presets: ['@babel/preset-typescript'],
};
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
export default {
testPathIgnorePatterns: ['/generated-tests/'],
extensionsToTreatAsEsm: ['.ts'],
};
2 changes: 1 addition & 1 deletion packages/vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
},
"devDependencies": {
"@babel/core": "^7.23.7",
"@babel/preset-env": "^7.23.7",
"@babel/preset-typescript": "^7.23.3",
"@jest/globals": "^29.7.0",
"@types/jest": "^29.5.11",
"@types/node": "^20.10.6",
"babel-jest": "^29.7.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/vitest/test/vitest-fast-check.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import * as path from 'path';
import * as url from 'url';
import { promises as fs } from 'fs';
import { promisify } from 'util';
import { execFile as _execFile } from 'child_process';
import { jest } from '@jest/globals';

const execFile = promisify(_execFile);
// @ts-expect-error --module must be higher
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));

import type _fc from 'fast-check';
import type { test as _test, it as _it } from '@fast-check/vitest';
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2838,8 +2838,8 @@ __metadata:
resolution: "@fast-check/vitest@workspace:packages/vitest"
dependencies:
"@babel/core": "npm:^7.23.7"
"@babel/preset-env": "npm:^7.23.7"
"@babel/preset-typescript": "npm:^7.23.3"
"@jest/globals": "npm:^29.7.0"
"@types/jest": "npm:^29.5.11"
"@types/node": "npm:^20.10.6"
babel-jest: "npm:^29.7.0"
Expand Down
Loading