tests: add e2e tests for plugin#1478
Conversation
|
Ahh, looking at tests |
|
@anshumanv strange, CI green |
|
@evilebottnawi I removed checks for yarn.lock(from both init and loader as either of them fails if checked), fails otherwise 😭 |
|
@anshumanv problems only locally? |
|
@evilebottnawi only in MacOS CI, passes locally on MacOS |
rishabh3112
left a comment
There was a problem hiding this comment.
Instead of yarn.lock, you can check for existence of node_modules folder. yarn.lock is there for checking whether packages are installed or not by the generator in the end. I think it would help for now.
Let me see if that works. 👍 |
|
@anshumanv Thanks for your update. I labeled the Pull Request so reviewers will review it again. @rishabh3112 Please review the new changes. |
alexander-akait
left a comment
There was a problem hiding this comment.
/cc @webpack/cli-team
rishabh3112
left a comment
There was a problem hiding this comment.
Looks good to me. Left a few suggestions.
test/init/auto/init-auto.test.js
Outdated
|
|
||
| // Test regressively files are scaffolded | ||
| const files = ['./sw.js', './package.json', './yarn.lock', './src/index.js']; | ||
| const files = ['./sw.js', './package.json', './src/index.js']; |
There was a problem hiding this comment.
This change is not needed now.
There was a problem hiding this comment.
Needed, these are still randomly failing.
There was a problem hiding this comment.
Then add a check for node_modules folder, we need to check whether packages are installed or not.
There was a problem hiding this comment.
Done, I hope it stays consistent now.
There was a problem hiding this comment.
Tried adding node_modules, same behaviour, would need debugging later.
|
|
||
| // Test regressively files are scaffolded | ||
| const files = ['./sw.js', './package.json', './yarn.lock', './src/index.js']; | ||
| const files = ['./sw.js', './package.json', './src/index.js']; |
test/plugin/plugin.test.js
Outdated
| const pluginPath = join(__dirname, pluginName); | ||
|
|
||
| // Since scaffolding is time consuming | ||
| jest.setTimeout(200000); |
There was a problem hiding this comment.
I'll reduce this, maybe I was testing
alexander-akait
left a comment
There was a problem hiding this comment.
/cc @webpack/cli-team
What kind of change does this PR introduce?
test
Did you add tests for your changes?
Yes
If relevant, did you update the documentation?
NA
Summary
Does this PR introduce a breaking change?
No
Other information
Did some util changes in #1476 , this should go after that.