E2E tests fails when creating a new nx-plugin workspace
See original GitHub issueCurrent Behavior
When creating a new NX plugin workspace using npx create-nx-plugin my-plugin-workspace --pluginName my-plugin
the E2E tests timeout.
Expected Behavior
The E2E tests should pass
Steps to Reproduce
npx create-nx-plugin@latest my-plugin-workspace --pluginName my-plugin
cd my-plugin-workspace
npm run e2e my-plugin-e2e
Failure Logs
FAIL my-plugin-e2e e2e/my-plugin-e2e/tests/my-plugin.spec.ts (28.243 s)
my-plugin e2e
× should create my-plugin (25347 ms)
--directory
× should create src in the specified directory (29 ms)
--tags
× should add tags to nx.json (3 ms)
● my-plugin e2e › should create my-plugin
: Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Error:
7 | } from '@nrwl/nx-plugin/testing';
8 | describe('my-plugin e2e', () => {
> 9 | it('should create my-plugin', async (done) => {
| ^
10 | const plugin = uniq('my-plugin');
11 | ensureNxProject(
12 | '@my-plugin-workspace/my-plugin',
at new Spec (../../node_modules/jest-jasmine2/build/jasmine/Spec.js:116:22)
at Suite.<anonymous> (tests/my-plugin.spec.ts:9:3)
at Object.<anonymous> (tests/my-plugin.spec.ts:8:1)
● my-plugin e2e › --directory › should create src in the specified directory
EBUSY: resource busy or locked, rmdir 'C:\Development\Personal\my-plugin-workspace/tmp/nx-e2e/proj'
at rmdirSync (../../node_modules/fs-extra/lib/remove/rimraf.js:276:13)
at Object.rimrafSync (../../node_modules/fs-extra/lib/remove/rimraf.js:252:7)
at Object.cleanup (../../packages/nx-plugin/src/utils/testing-utils/utils.ts:119:3)
at newNxProject (../../packages/nx-plugin/src/utils/testing-utils/nx-project.ts:67:3)
at Object.ensureNxProject (../../packages/nx-plugin/src/utils/testing-utils/nx-project.ts:82:3)
at tests/my-plugin.spec.ts:28:7
at ../../node_modules/tslib/tslib.js:114:75
● my-plugin e2e › --tags › should add tags to nx.json
EBUSY: resource busy or locked, rmdir 'C:\Development\Personal\my-plugin-workspace/tmp/nx-e2e/proj'
at rmdirSync (../../node_modules/fs-extra/lib/remove/rimraf.js:276:13)
at Object.rimrafSync (../../node_modules/fs-extra/lib/remove/rimraf.js:252:7)
at Object.cleanup (../../packages/nx-plugin/src/utils/testing-utils/utils.ts:119:3)
at newNxProject (../../packages/nx-plugin/src/utils/testing-utils/nx-project.ts:67:3)
at Object.ensureNxProject (../../packages/nx-plugin/src/utils/testing-utils/nx-project.ts:82:3)
at tests/my-plugin.spec.ts:45:7
at ../../node_modules/tslib/tslib.js:114:75
Test Suites: 1 failed, 1 total
Tests: 3 failed, 3 total
Snapshots: 0 total
Time: 29.911 s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-plugin-workspace@0.0.0 e2e: `nx e2e "my-plugin-e2e"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-plugin-workspace@0.0.0 e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\stefa\AppData\Roaming\npm-cache\_logs\2020-12-20T12_04_00_253Z-debug.log
Environment
Node : 14.15.0
OS : win32 x64
npm : 6.14.8
nx : Not Found
@nrwl/angular : Not Found
@nrwl/cli : 11.0.15
@nrwl/cypress : Not Found
@nrwl/devkit : 11.0.15
@nrwl/eslint-plugin-nx : 11.0.15
@nrwl/express : Not Found
@nrwl/jest : 11.0.15
@nrwl/linter : 11.0.15
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : 11.0.15
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 11.0.15
@nrwl/web : Not Found
@nrwl/workspace : 11.0.15
typescript : 4.0.5
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:6 (1 by maintainers)
Top Results From Across the Web
E2E tests are not running on Jenkins job - Stack Overflow
I have a Maven project written in Java where I created a suite of E2E (End To End) tests realised using Selenium.
Read more >Unit test reports - GitLab Docs
If the tests fail, the pipeline fails and users get notified. The person that works on the merge request has to check the...
Read more >Troubleshooting - Jest
Use this guide to resolve issues with Jest. Tests are Failing and You Don't Know Why. Try using the debugging support built into...
Read more >Language Server Extension Guide - Visual Studio Code
Explain how to run, debug, log, and test the Language Server extension. ... To follow the walkthrough, you can create a new server.ts...
Read more >cypress-fail-fast - npm
If you want to configure the plugin on a specific test, you can set this by using the failFast property in test configuration....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
faced the same issue, as a work around I changed the timeout (in ms) value and the test passes
This is still an issue for me, on Windows.
When I run the e2e (on a freshly generated plugin):
When I run that inner
node
command I get: