Skip to content

Commit

Permalink
chore+fix: upgrade jest + fix flaky renderStream test! (coralproject#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cvle authored and wyattjoh committed Jun 7, 2019
1 parent 5b64d3d commit 8126491
Show file tree
Hide file tree
Showing 7 changed files with 2,257 additions and 3,192 deletions.
3 changes: 2 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const lodashOptimizations =
process.env.WEBPACK === "true" ? ["use-lodash-es", "lodash"] : [];

module.exports = {
babelrcRoots: ["./src/core/client/*"],
env: {
production: {
plugins: [...lodashOptimizations],
Expand All @@ -18,7 +19,7 @@ module.exports = {
},
test: {
presets: [
["@babel/env", { targets: "last 2 versions", modules: "commonjs" }],
["@babel/env", { targets: { node: "current" } }],
"@babel/react",
],
plugins: ["dynamic-import-node"],
Expand Down
8 changes: 5 additions & 3 deletions config/jest/client.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ module.exports = {
"<rootDir>/src/core/build/polyfills.js",
"<rootDir>/src/core/client/test/setup.ts",
],
setupTestFrameworkScriptFile:
"<rootDir>/src/core/client/test/setupTestFramework.ts",
setupFilesAfterEnv: ["<rootDir>/src/core/client/test/setupTestFramework.ts"],
testMatch: ["**/*.spec.{js,jsx,mjs,ts,tsx}"],
testEnvironment: "node",
testURL: "http://localhost",
Expand Down Expand Up @@ -40,7 +39,10 @@ module.exports = {
globals: {
"ts-jest": {
useBabelrc: true,
tsConfigFile: path.resolve(__dirname, "tsconfig.jest.json"),
tsConfigFile: path.resolve(
__dirname,
"../../src/core/client/tsconfig.json"
),
},
},
};
3 changes: 3 additions & 0 deletions config/jest/server.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const path = require("path");

module.exports = {
displayName: "server",
rootDir: "../../",
Expand All @@ -19,6 +21,7 @@ module.exports = {
globals: {
"ts-jest": {
useBabelrc: true,
tsConfigFile: path.resolve(__dirname, "../../src/tsconfig.json"),
},
},
};
7 changes: 0 additions & 7 deletions config/jest/tsconfig.jest.json

This file was deleted.

Loading

0 comments on commit 8126491

Please sign in to comment.