-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reworks test configurations to allow for lerna run test
adds coverage reports replaces .babelrc with package.json config in core adds new travis build
- Loading branch information
1 parent
79b7435
commit 9add11e
Showing
12 changed files
with
135 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ node_modules/ | |
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
coverage | ||
|
||
# production | ||
lib | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
language: node_js | ||
node_js: | ||
- 'node' | ||
- "8" | ||
before_script: | ||
- cd minimal_redux_poc | ||
- npm install | ||
- cd packages/mirador3-core | ||
- npm install | ||
- cd ../mirador3-app | ||
- npm install | ||
- cd ../.. | ||
- lerna run build | ||
script: lerna run test --stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,27 @@ | ||
# research-and-demos | ||
Proofs of concept for Mirador 3 | ||
|
||
1. git clone the repository | ||
2. Navigate to the relevant POC, for example, `cd minimal_redux_poc` | ||
3. Follow the README for that POC. | ||
## lerna | ||
lerna helps manage the Mirador3 "monorepo" | ||
|
||
### using lerna | ||
|
||
#### `$ lerna bootstrap` | ||
|
||
Link local packages together and installs package dependencies | ||
|
||
#### `$ lerna run build` | ||
|
||
build production packages | ||
|
||
#### `$ lerna run start` | ||
|
||
start the development mode application | ||
|
||
#### `$ lerna run test` | ||
|
||
lints and runs tests (use with --stream to see output) | ||
|
||
#### `$ lerna run test:coverage` | ||
|
||
runs test with coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
build/ | ||
config/ | ||
scripts/ | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"collectCoverageFrom": [ | ||
"src/**/*.{js,jsx,ts,tsx}", | ||
"!src/**/*.d.ts" | ||
], | ||
"coverageDirectory": "<rootDir>/coverage", | ||
"coverageReporters": ["html"], | ||
"resolver": "jest-pnp-resolver", | ||
"setupFiles": [ | ||
"jest-canvas-mock" | ||
], | ||
"setupTestFrameworkScriptFile": "<rootDir>/src/setupTests.js", | ||
"testMatch": [ | ||
"<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}", | ||
"<rootDir>/src/**/?(*.)(spec|test).{js,jsx,ts,tsx}" | ||
], | ||
"testEnvironment": "jsdom", | ||
"testURL": "http://localhost", | ||
"transform": { | ||
"^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/babel-jest", | ||
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js", | ||
"^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js" | ||
}, | ||
"transformIgnorePatterns": [ | ||
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$", | ||
"^.+\\.module\\.(css|sass|scss)$" | ||
], | ||
"moduleNameMapper": { | ||
"^react-native$": "react-native-web", | ||
"^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy" | ||
}, | ||
"moduleFileExtensions": [ | ||
"web.js", | ||
"js", | ||
"web.ts", | ||
"ts", | ||
"web.tsx", | ||
"tsx", | ||
"json", | ||
"web.jsx", | ||
"jsx", | ||
"node" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
lib/ | ||
config/ | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"automock": false, | ||
"setupTestFrameworkScriptFile": "<rootDir>/src/setupTests.js", | ||
"collectCoverageFrom": [ | ||
"src/**/*.{js,jsx,ts,tsx}", | ||
"!src/**/*.d.ts" | ||
], | ||
"coverageDirectory": "<rootDir>/coverage", | ||
"coverageReporters": ["html"], | ||
"resolver": "jest-pnp-resolver", | ||
"testMatch": [ | ||
"<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}", | ||
"<rootDir>/src/**/?(*.)(spec|test).{js,jsx,ts,tsx}" | ||
], | ||
"testEnvironment": "jsdom", | ||
"testURL": "http://localhost", | ||
"transform": { | ||
"^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/babel-jest", | ||
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js", | ||
"^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js" | ||
}, | ||
"transformIgnorePatterns": [ | ||
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$", | ||
"^.+\\.module\\.(css|sass|scss)$" | ||
], | ||
"moduleNameMapper": { | ||
"^react-native$": "react-native-web", | ||
"^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy" | ||
}, | ||
"moduleFileExtensions": [ | ||
"web.js", | ||
"js", | ||
"web.ts", | ||
"ts", | ||
"web.tsx", | ||
"tsx", | ||
"json", | ||
"web.jsx", | ||
"jsx", | ||
"node" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters