Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Migrate jest to use projects feature (#322)
## Details This PR changes the way jest is configured in the mono-repo, to leverage the `projects` feature properly. This would allow us to have a different jest config for each project. Changes: * Remove component registry in the engine * Fix tests that are using `root` instead of `template` * Fix tests with duplicate component names > The test running will also print the package name next to the test 💃 <img width="710" alt="screen shot 2018-05-21 at 8 41 41 am" src="https://user-images.githubusercontent.com/2567083/40316332-db609542-5cd2-11e8-9144-9085667896d4.png"> ---- In upcoming a PR I want to get rid of all the remaining warnings by introducing a custom matcher that will trap the warnings and the errors (#94, #104). All the unexpected console `log`, `warn` and `error` should make the test fail. Doing this would greatly improve quality and the consistency of the warnings the engine surfaces. ## Does this PR introduce a breaking change? * [ ] Yes * [X] No
- Loading branch information
Showing
30 changed files
with
188 additions
and
122 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,6 @@ | ||
const BASE_CONFIG = require('../../scripts/jest/base.config'); | ||
|
||
module.exports = { | ||
...BASE_CONFIG, | ||
displayName: 'babel-plugin-transform-lwc-class', | ||
}; |
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,6 @@ | ||
const BASE_CONFIG = require('../../scripts/jest/base.config'); | ||
|
||
module.exports = { | ||
...BASE_CONFIG, | ||
displayName: 'lwc-compiler', | ||
}; |
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,6 @@ | ||
const BASE_CONFIG = require('../../scripts/jest/base.config'); | ||
|
||
module.exports = { | ||
...BASE_CONFIG, | ||
displayName: 'lwc-engine', | ||
}; |
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
File renamed without changes.
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
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
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
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
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
Oops, something went wrong.