Skip to content

Commit c4cfa92

Browse files
committed
removing ts-node from test:standalone
1 parent 57405d6 commit c4cfa92

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
lines changed

Diff for: .github/workflows/CI.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- name: Build test app
6060
run: npm run build:test
6161
- name: Run standalone tests
62-
run: npm run test:standalone tests/format tests/integration tests/unit/prettier-version
62+
run: npm run test:standalone
6363

6464
test_linux:
6565
name: Test on Linux with Node ${{ matrix.node }}

Diff for: jest.config.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
const TEST_STANDALONE = Boolean(process.env.TEST_STANDALONE);
2-
const testMatch = [
3-
'<rootDir>/tests/format/**/jsfmt.spec.js',
4-
'<rootDir>/tests/unit/**/*.test.js'
5-
];
2+
const testMatch = ['<rootDir>/tests/format/**/jsfmt.spec.js'];
63

74
if (TEST_STANDALONE) {
8-
testMatch.push('<rootDir>/tests/integration/**/*.test.js');
5+
testMatch.push(
6+
'<rootDir>/tests/integration/**/*.test.js',
7+
'<rootDir>/tests/unit/prettier-version/**/*.test.js'
8+
);
9+
} else {
10+
testMatch.push('<rootDir>/tests/unit/**/*.test.js');
911
}
1012

1113
export default {

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"prettier": "prettier './*.{ts,js,cjs,json,md,yml}' '{src,tests}/**/*.{ts,js,cjs}'",
2727
"test": "NODE_OPTIONS=\"--loader=ts-node/esm --loader=esmock\" jest",
2828
"test:all": "cross-env FULL_TEST=1 NODE_OPTIONS=\"--loader=ts-node/esm --loader=esmock\" c8 jest",
29-
"test:standalone": "cross-env NODE_OPTIONS=\"--loader=ts-node/esm\" TEST_STANDALONE=1 FULL_TEST=1 jest"
29+
"test:standalone": "cross-env TEST_STANDALONE=1 FULL_TEST=1 jest"
3030
},
3131
"files": [
3232
"src",

Diff for: tests/config/get-prettier.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function getPrettierInternal() {
22
const entry = process.env.TEST_STANDALONE
33
? new URL("./require-standalone.cjs", import.meta.url)
4-
: new URL("./require-prettier.cjs", import.meta.url);
4+
: "prettier";
55

66
return import(entry).then((module) => module.default);
77
}

Diff for: tests/config/require-prettier.cjs

-5
This file was deleted.

0 commit comments

Comments
 (0)