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

test: switch to vitest #289

Merged
merged 1 commit into from
Feb 2, 2025
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
13 changes: 0 additions & 13 deletions jest.config.js

This file was deleted.

9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"prettier:check": "prettier --list-different \"{src,test}/**/*.ts\"",
"prettier:write": "prettier --write \"{src,test}/**/*.ts\"",
"pretest": "tsc",
"test": "cross-env NODE_OPTIONS=\"--experimental-vm-modules\" jest"
"test": "vitest run"
},
"author": {
"name": "Samuel Attard",
Expand All @@ -30,15 +30,12 @@
"devDependencies": {
"@electron/docs-parser": "^2.0.0",
"@types/debug": "^4.1.12",
"@types/jest": "^29.5.13",
"@types/lodash": "^4.17.7",
"cross-env": "^7.0.3",
"husky": "^9.1.6",
"jest": "^30.0.0-alpha.6",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"ts-jest": "^29.2.5",
"typescript": "^5.6.2"
"typescript": "^5.6.2",
"vitest": "^3.0.4"
},
"dependencies": {
"@types/node": "^20.11.25",
Expand Down
2 changes: 2 additions & 0 deletions test/output.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import fs from 'node:fs';
import { spawnSync } from 'node:child_process';
import path from 'node:path';

import { beforeAll, describe, expect, it } from 'vitest';

const OUTPUT_PATH = path.resolve(import.meta.dirname, '..', 'electron.d.ts');
let output: string;

Expand Down
1 change: 1 addition & 0 deletions test/remap-optionals.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import _ from 'lodash';
import { describe, expect, it } from 'vitest';

import { remapOptionals } from '../src/remap-optionals.js';

Expand Down
1 change: 1 addition & 0 deletions test/utils.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DocumentationTag } from '@electron/docs-parser';
import { describe, expect, it } from 'vitest';

import * as utils from '../src/utils.js';

Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"es7"
],
"types": [
"node",
"jest"
"node"
],
"declaration": false,
"sourceMap": true,
Expand Down
2,825 changes: 494 additions & 2,331 deletions yarn.lock

Large diffs are not rendered by default.