Update test:dist-standalone script (#8802)

This commit is contained in:
fisker Cheung authored and GitHub committed 2020-07-20 20:20:22 +08:00
1 parent caade6ba5e
commit 42dac21e52
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -6,6 +6,7 @@ const ENABLE_CODE_COVERAGE = !!process.env.ENABLE_CODE_COVERAGE;
if (process.env.NODE_ENV === "production" || process.env.INSTALL_PACKAGE) {
process.env.PRETTIER_DIR = installPrettier();
}
const { TEST_STANDALONE } = process.env;
module.exports = {
setupFiles: ["<rootDir>/tests_config/run_spec.js"],
@@ -14,6 +15,9 @@ module.exports = {
"jest-snapshot-serializer-ansi",
],
testRegex: "jsfmt\\.spec\\.js$|__tests__/.*\\.js$",
testPathIgnorePatterns: TEST_STANDALONE
? ["<rootDir>/tests_integration/"]
: [],
collectCoverage: ENABLE_CODE_COVERAGE,
collectCoverageFrom: ["src/**/*.js", "index.js", "!<rootDir>/node_modules/"],
coveragePathIgnorePatterns: [
+1 -1
View File
@@ -126,7 +126,7 @@
"test": "jest",
"test:dev-package": "cross-env INSTALL_PACKAGE=1 jest",
"test:dist": "cross-env NODE_ENV=production jest",
"test:dist-standalone": "cross-env NODE_ENV=production TEST_STANDALONE=1 jest tests/",
"test:dist-standalone": "cross-env NODE_ENV=production TEST_STANDALONE=1 jest",
"test:integration": "jest tests_integration",
"perf:repeat": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null",
"perf:repeat-inspect": "yarn && yarn build && cross-env NODE_ENV=production node --inspect-brk ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null",