mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-25 12:19:10 +00:00
jest: fix for new monorepo
This commit is contained in:
parent
057e9f96b4
commit
51dd8bd6b1
10 changed files with 48 additions and 38 deletions
|
@ -1,3 +1,3 @@
|
|||
module.exports = {
|
||||
|
||||
babelrcRoots: ['packages/*']
|
||||
}
|
||||
|
|
9
jest.config.js
Normal file
9
jest.config.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
module.exports = {
|
||||
testMatch: ['**/*.test.js'],
|
||||
verbose: true,
|
||||
bail: true,
|
||||
setupFilesAfterEnv: ['<rootDir>/setupTests.js'],
|
||||
snapshotSerializers: [
|
||||
'enzyme-to-json/serializer'
|
||||
]
|
||||
}
|
14
package.json
14
package.json
|
@ -5,13 +5,14 @@
|
|||
"scripts": {
|
||||
"lerna": "lerna",
|
||||
"start": "lerna run start",
|
||||
"dev": "lerna run dev",
|
||||
"dev": "babel-node packages/roleypoly-server/index.js",
|
||||
"build": "lerna run build",
|
||||
"flow:install": "flow-mono install-types",
|
||||
"remotedebug": "remotedebug_ios_webkit_adapter --port=9000 > /dev/null",
|
||||
"test": "jest",
|
||||
"test": "jest --color --coverage",
|
||||
"lint:css": "stylelint 'packages/roleypoly-ui/**/*.js'",
|
||||
"rpcrepl": "babel-node packages/roleypoly-server/util/rpcrepl.js"
|
||||
"rpcrepl": "babel-node packages/roleypoly-server/util/rpcrepl.js",
|
||||
"dev:up": "docker-compose up -d"
|
||||
},
|
||||
"private": true,
|
||||
"workspaces": [
|
||||
|
@ -27,8 +28,10 @@
|
|||
"@babel/plugin-transform-runtime": "^7.4.3",
|
||||
"@babel/preset-env": "^7.4.3",
|
||||
"@babel/preset-flow": "^7.0.0",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"await-outside": "^2.1.2",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-jest": "^24.7.0",
|
||||
"babel-plugin-styled-components": "^1.10.0",
|
||||
"babel-plugin-transform-flow-strip-types": "^6.22.0",
|
||||
"chokidar": "^2.1.5",
|
||||
|
@ -64,10 +67,5 @@
|
|||
"$Shape",
|
||||
"$Call"
|
||||
]
|
||||
},
|
||||
"jest": {
|
||||
"projects": [
|
||||
"projects/*/jest.config.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,10 +53,6 @@
|
|||
"babel-plugin-transform-flow-strip-types": "^6.22.0",
|
||||
"chokidar": "^2.1.5",
|
||||
"eslint-plugin-flowtype": "^3.4.2",
|
||||
"flow-bin": "^0.96.0",
|
||||
"flow-typed": "^2.5.1",
|
||||
"jest": "^24.6.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"standard": "12.0.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,18 @@
|
|||
"next/babel", "@babel/preset-flow"
|
||||
],
|
||||
"plugins": [
|
||||
[ "styled-components", { "ssr": true } ],
|
||||
"@babel/plugin-proposal-optional-chaining"
|
||||
]
|
||||
"@babel/plugin-syntax-dynamic-import",
|
||||
"@babel/plugin-proposal-class-properties",
|
||||
["@babel/plugin-transform-runtime",
|
||||
{ "helpers": false }],
|
||||
[ "styled-components", { "ssr": true } ],
|
||||
"@babel/plugin-proposal-optional-chaining"
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
"presets": [
|
||||
["next/babel", {"preset-env": {"modules": "commonjs"}}]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ exports[`<DiscordGuildPic /> falls-back to a default when things go bad. 1`] = `
|
|||
"$$typeof": Symbol(react.forward_ref),
|
||||
"attrs": Array [],
|
||||
"componentStyle": ComponentStyle {
|
||||
"componentId": "discord-guild-pic__Fallback-d55lwu-0",
|
||||
"componentId": "discord-guild-pic__Fallback-sc-93euug-0",
|
||||
"isStatic": true,
|
||||
"lastClassName": "c0",
|
||||
"rules": Array [
|
||||
|
@ -46,7 +46,7 @@ exports[`<DiscordGuildPic /> falls-back to a default when things go bad. 1`] = `
|
|||
"displayName": "discord-guild-pic__Fallback",
|
||||
"foldedComponentIds": Array [],
|
||||
"render": [Function],
|
||||
"styledComponentId": "discord-guild-pic__Fallback-d55lwu-0",
|
||||
"styledComponentId": "discord-guild-pic__Fallback-sc-93euug-0",
|
||||
"target": "div",
|
||||
"toString": [Function],
|
||||
"warnTooManyClasses": [Function],
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
"name": "@roleypoly/ui",
|
||||
"private": true,
|
||||
"version": "2.0.0",
|
||||
"scripts": {
|
||||
"build": "next build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@roleypoly/types": "^2.0.0",
|
||||
"color": "^3.1.0",
|
||||
|
@ -22,16 +25,15 @@
|
|||
"superagent": "^5.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.2.3",
|
||||
"@babel/core": "^7.4.0",
|
||||
"@babel/cli": "^7.4.3",
|
||||
"@babel/core": "^7.4.3",
|
||||
"@babel/node": "^7.2.2",
|
||||
"@babel/plugin-proposal-class-properties": "^7.4.0",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.2.0",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||
"@babel/plugin-transform-runtime": "^7.4.0",
|
||||
"@babel/preset-env": "^7.4.2",
|
||||
"@babel/plugin-transform-runtime": "^7.4.3",
|
||||
"@babel/preset-env": "^7.4.3",
|
||||
"@babel/preset-flow": "^7.0.0",
|
||||
"await-outside": "^2.1.2",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-plugin-styled-components": "^1.10.0",
|
||||
"babel-plugin-transform-flow-strip-types": "^6.22.0",
|
||||
|
@ -39,11 +41,6 @@
|
|||
"enzyme-adapter-react-16": "^1.11.2",
|
||||
"enzyme-to-json": "^3.3.5",
|
||||
"eslint-plugin-flowtype": "^3.4.2",
|
||||
"flow-bin": "^0.96.0",
|
||||
"flow-typed": "^2.5.1",
|
||||
"jest": "^24.6.0",
|
||||
"jest-styled-components": "^6.3.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"react-test-renderer": "^16.8.6",
|
||||
"standard": "12.0.1"
|
||||
}
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
import { configure } from 'enzyme'
|
||||
import Adapter from 'enzyme-adapter-react-16'
|
||||
|
||||
configure({ adapter: new Adapter() })
|
3
setupTests.js
Normal file
3
setupTests.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
const enzyme = require('enzyme')
|
||||
const Adapter = require('enzyme-adapter-react-16')
|
||||
enzyme.configure({ adapter: new Adapter() })
|
12
yarn.lock
12
yarn.lock
|
@ -2,7 +2,7 @@
|
|||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@babel/cli@^7.2.3", "@babel/cli@^7.4.3":
|
||||
"@babel/cli@^7.4.3":
|
||||
version "7.4.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.4.3.tgz#353048551306ff42e5855b788b6ccd9477289774"
|
||||
integrity sha512-cbC5H9iTDV9H7sMxK5rUm18UbdVPNTPqgdzmQAkOUP3YLysgDWLZaysVAfylK49rgTlzL01a6tXyq9rCb3yLhQ==
|
||||
|
@ -46,7 +46,7 @@
|
|||
semver "^5.4.1"
|
||||
source-map "^0.5.0"
|
||||
|
||||
"@babel/core@>=7.1.0", "@babel/core@^7.4.0", "@babel/core@^7.4.3":
|
||||
"@babel/core@>=7.1.0", "@babel/core@^7.4.3":
|
||||
version "7.4.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.4.3.tgz#198d6d3af4567be3989550d97e068de94503074f"
|
||||
integrity sha512-oDpASqKFlbspQfzAE7yaeTmdljSH2ADIvBlb0RwbStltTuWa0+7CCI1fYVINNv9saHPa1W7oaKeuNuKj+RQCvA==
|
||||
|
@ -821,7 +821,7 @@
|
|||
resolve "^1.8.1"
|
||||
semver "^5.5.1"
|
||||
|
||||
"@babel/plugin-transform-runtime@^7.4.0", "@babel/plugin-transform-runtime@^7.4.3":
|
||||
"@babel/plugin-transform-runtime@^7.4.3":
|
||||
version "7.4.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.3.tgz#4d6691690ecdc9f5cb8c3ab170a1576c1f556371"
|
||||
integrity sha512-7Q61bU+uEI7bCUFReT1NKn7/X6sDQsZ7wL1sJ9IYMAO7cI+eg6x9re1cEw2fCRMbbTVyoeUKWSV1M6azEfKCfg==
|
||||
|
@ -941,7 +941,7 @@
|
|||
js-levenshtein "^1.1.3"
|
||||
semver "^5.3.0"
|
||||
|
||||
"@babel/preset-env@^7.4.2", "@babel/preset-env@^7.4.3":
|
||||
"@babel/preset-env@^7.4.3":
|
||||
version "7.4.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.4.3.tgz#e71e16e123dc0fbf65a52cbcbcefd072fbd02880"
|
||||
integrity sha512-FYbZdV12yHdJU5Z70cEg0f6lvtpZ8jFSDakTm7WXeJbLXh4R0ztGEu/SW7G1nJ2ZvKwDhz8YrbA84eYyprmGqw==
|
||||
|
@ -1003,7 +1003,7 @@
|
|||
"@babel/helper-plugin-utils" "^7.0.0"
|
||||
"@babel/plugin-transform-flow-strip-types" "^7.0.0"
|
||||
|
||||
"@babel/preset-react@7.0.0":
|
||||
"@babel/preset-react@7.0.0", "@babel/preset-react@^7.0.0":
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.0.0.tgz#e86b4b3d99433c7b3e9e91747e2653958bc6b3c0"
|
||||
integrity sha512-oayxyPS4Zj+hF6Et11BwuBkmpgT/zMxyuZgFrMeZID6Hdh3dGlk4sHCAhdBCpuCKW2ppBfl2uCCetlrUIJRY3w==
|
||||
|
@ -7006,7 +7006,7 @@ jest-worker@^24.6.0:
|
|||
merge-stream "^1.0.1"
|
||||
supports-color "^6.1.0"
|
||||
|
||||
jest@^24.6.0, jest@^24.7.0:
|
||||
jest@^24.7.0:
|
||||
version "24.7.0"
|
||||
resolved "https://registry.yarnpkg.com/jest/-/jest-24.7.0.tgz#5fa8dee8b81d734d80af14a2606cbb90c682664d"
|
||||
integrity sha512-1bb9H06UeqTgiyZ9Lm81No06YdWq7f4ahLdQZJnQ0n2wuyA+ODrRfbqM8emmSS85IDw54LodW0tlud/b2F+4dQ==
|
||||
|
|
Loading…
Add table
Reference in a new issue