-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support for running acceptance tests from vscode
vscode extension uses the root jest.config.js file, so that file should support acceptance tests too, not only units. This commit creates two different jest projects (unit and acceptance) and a root jest.config.js that group both projects (#19)
- Loading branch information
Showing
5 changed files
with
34 additions
and
30 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
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,15 @@ | ||
// @flow | ||
/* eslint-disable filenames/match-regex */ | ||
|
||
const config /* : any */ = { | ||
// Automatically restore mock state between every test | ||
restoreMocks: true, | ||
collectCoverageFrom: [ | ||
'**/src/**/*.js', | ||
'!**/node_modules/**', | ||
'!**/__*__/**', // ignore tests, acceptance, stories, etc | ||
], | ||
coverageReporters: ['json-summary', 'lcov'], | ||
}; | ||
|
||
module.exports = config; |
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,27 +1,6 @@ | ||
// @flow | ||
/* eslint-disable filenames/match-regex */ | ||
|
||
const config /* : any */ = { | ||
// Automatically restore mock state between every test | ||
restoreMocks: true, | ||
|
||
testMatch: ['**/__tests__/*-test.js'], | ||
collectCoverageFrom: [ | ||
'**/src/**/*.js', | ||
'!**/node_modules/**', | ||
'!**/__*__/**', // ignore tests, acceptance, stories, etc | ||
], | ||
|
||
coverageReporters: ['json-summary', 'lcov'], | ||
|
||
testURL: 'http://test.tuenti.com', | ||
|
||
// transform: { | ||
// '^.+\\.js$': require.resolve('./src/babel-jest-transformer'), | ||
// }, | ||
|
||
// A list of paths to modules that run some code to configure or set up the testing framework before each test | ||
setupFilesAfterEnv: [require.resolve('./setup-test-env'), '@testing-library/jest-dom/extend-expect'], | ||
module.exports = { | ||
...require('./jest.base.config'), | ||
projects: ['<rootDir>/jest.unit.config.js', '<rootDir>/jest.acceptance.config.js'], | ||
}; | ||
|
||
module.exports = config; |
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,12 @@ | ||
// @flow | ||
/* eslint-disable filenames/match-regex */ | ||
|
||
const config /* : any */ = { | ||
...require('./jest.base.config'), | ||
displayName: 'unit', | ||
testMatch: ['**/__tests__/*-test.js'], | ||
testURL: 'http://test.tuenti.com', | ||
setupFilesAfterEnv: [require.resolve('./setup-test-env'), '@testing-library/jest-dom/extend-expect'], | ||
}; | ||
|
||
module.exports = config; |
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
0dbf971
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for mistica-web ready!
Built with commit 0dbf971
https://mistica-web-r0fygexj6.now.sh