Skip to content

Commit 5d44105

Browse files
authored
[chore] Replace jest with vitest for test running in node-build-scripts (#7981)
1 parent 9ccf429 commit 5d44105

6 files changed

Lines changed: 44 additions & 1395 deletions

File tree

packages/node-build-scripts/jest.config.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

packages/node-build-scripts/package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"import": "./index.mjs"
88
},
99
"scripts": {
10-
"test": "NODE_OPTIONS=--experimental-vm-modules jest"
10+
"test": "vitest run"
1111
},
1212
"bin": {
1313
"assert-package-layout": "./assert-package-layout.mjs",
@@ -47,13 +47,10 @@
4747
"yargs": "^17.7.2"
4848
},
4949
"devDependencies": {
50-
"@jest/globals": "^29.7.0",
51-
"@swc/core": "^1.3.105",
52-
"@swc/jest": "^0.2.31",
5350
"@types/fs-extra": "~11.0.4",
5451
"@types/svgo": "~1.3.6",
5552
"@types/yargs": "~17.0.32",
56-
"jest": "^29.7.0"
53+
"vitest": "catalog:"
5754
},
5855
"engines": {
5956
"node": ">=20.11"

packages/node-build-scripts/src/__tests__/cssVariables.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright 2023 Palantir Technologies, Inc. All rights reserved.
33
*/
44

5-
import { describe, expect, test } from "@jest/globals";
5+
import { describe, expect, test } from "vitest";
66
import { readFileSync } from "node:fs";
77
import { join, resolve, dirname } from "node:path";
88
import { fileURLToPath } from "node:url";
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* !
2+
* (c) Copyright 2026 Palantir Technologies Inc. All rights reserved.
3+
*/
4+
5+
import { defineConfig } from "vitest/config";
6+
7+
export default defineConfig({
8+
test: {
9+
name: "node-build-scripts",
10+
environment: "node",
11+
include: ["src/**/*.test.ts"],
12+
},
13+
});

0 commit comments

Comments
 (0)