Skip to content

Commit

Permalink
update (#14885)
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed Aug 27, 2022
1 parent cad4ea7 commit 92c93a2
Show file tree
Hide file tree
Showing 5 changed files with 464 additions and 457 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -202,6 +202,16 @@ jobs:
# Deduplicate dependencies, because duplicate copies of graceful-fs cause
# problems with the "path" module: https://github.com/facebook/jest/issues/9656
yarn dedupe
- name: Downgrade Jest for node == 12
if: matrix.node-version == '12'
run: |
yarn remove jest
yarn remove jest-light-runner
yarn add --dev jest@28
yarn add --dev jest-light-runner@0.3.0
# Deduplicate dependencies, because duplicate copies of graceful-fs cause
# problems with the "path" module: https://github.com/facebook/jest/issues/9656
yarn dedupe
- uses: actions/download-artifact@v3
with:
name: babel-artifact
Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Expand Up @@ -11,6 +11,7 @@ const isPublishBundle = process.env.IS_PUBLISH;
module.exports = {
runner: supportsESMAndJestLightRunner ? "jest-light-runner" : "jest-runner",

snapshotFormat: { escapeString: true, printBasicPrototype: true },
collectCoverageFrom: [
"packages/*/src/**/*.{js,cjs,mjs,ts}",
"codemods/*/src/**/*.{js,cjs,mjs,ts}",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -58,9 +58,9 @@
"gulp-plumber": "^1.2.1",
"husky": "^7.0.4",
"import-meta-resolve": "^1.1.1",
"jest": "^28.0.3",
"jest-light-runner": "^0.3.0",
"jest-worker": "^27.4.0",
"jest": "^29.0.1",
"jest-light-runner": "^0.4.0",
"jest-worker": "^29.0.1",
"lint-staged": "^13.0.3",
"mergeiterator": "^1.4.4",
"prettier": "^2.7.1",
Expand Down
Expand Up @@ -32,17 +32,17 @@ describe("normalize options", () => {
});
it("default values", () => {
expect(normalizeOptions({})).toMatchInlineSnapshot(`
Object {
"allExtensions": false,
"allowNamespaces": true,
"disallowAmbiguousJSXLike": false,
"isTSX": false,
"jsxPragma": "React",
"jsxPragmaFrag": "React.Fragment",
"onlyRemoveTypeImports": true,
"optimizeConstEnums": false,
}
`);
Object {
"allExtensions": false,
"allowNamespaces": true,
"disallowAmbiguousJSXLike": false,
"isTSX": false,
"jsxPragma": "React",
"jsxPragmaFrag": "React.Fragment",
"onlyRemoveTypeImports": true,
"optimizeConstEnums": false,
}
`);
});
});
(process.env.BABEL_8_BREAKING ? describe.skip : describe)("Babel 7", () => {
Expand Down Expand Up @@ -81,17 +81,17 @@ Object {
);
it("default values", () => {
expect(normalizeOptions({})).toMatchInlineSnapshot(`
Object {
"allExtensions": false,
"allowNamespaces": true,
"disallowAmbiguousJSXLike": false,
"isTSX": false,
"jsxPragma": undefined,
"jsxPragmaFrag": "React.Fragment",
"onlyRemoveTypeImports": undefined,
"optimizeConstEnums": false,
}
`);
Object {
"allExtensions": false,
"allowNamespaces": true,
"disallowAmbiguousJSXLike": false,
"isTSX": false,
"jsxPragma": undefined,
"jsxPragmaFrag": "React.Fragment",
"onlyRemoveTypeImports": undefined,
"optimizeConstEnums": false,
}
`);
});
});
});

0 comments on commit 92c93a2

Please sign in to comment.