e2e tests fails when rxjs is introduced to project
See original GitHub issueExpected Behavior
Running e2e
tests should open cypress.
Current Behavior
Fails with: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
Failure Information (for bugs)
I suspect that it is due to some internal configuration of how cypress is being incorporated. I only have dependencies installed I don’t use them and e2e
tests won’t run.
Steps to Reproduce
git clone git@github.com:urosappdev/nx-js-bug.git
nx run e2e booking-e2e
Context
package.json
{
"name": "tp",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"nx": "nx",
"start": "nx serve",
"build": "nx build",
"test": "nx test",
"lint": "nx workspace-lint && nx lint",
"e2e": "nx e2e",
"affected:apps": "nx affected:apps",
"affected:libs": "nx affected:libs",
"affected:build": "nx affected:build",
"affected:e2e": "nx affected:e2e",
"affected:test": "nx affected:test",
"affected:lint": "nx affected:lint",
"affected:dep-graph": "nx affected:dep-graph",
"affected": "nx affected",
"format": "nx format:write",
"format:write": "nx format:write",
"format:check": "nx format:check",
"workspace-schematic": "nx workspace-schematic",
"dep-graph": "nx dep-graph",
"help": "nx help"
},
"private": true,
"dependencies": {
"@nestjs/common": "^6.2.4",
"@nestjs/core": "^6.2.4",
"@nestjs/platform-express": "^6.2.4",
"document-register-element": "1.13.1",
"react": "16.9.0",
"react-dom": "16.9.0",
"react-router-dom": "5.0.1",
"reflect-metadata": "^0.1.12",
"rxfire": "^3.8.2",
"rxjs": "^6.5.3",
"styled-components": "4.3.2"
},
"devDependencies": {
"@babel/preset-react": "7.0.0",
"@nestjs/schematics": "^6.3.0",
"@nestjs/testing": "^6.2.4",
"@nrwl/cypress": "8.5.1",
"@nrwl/eslint-plugin-nx": "8.5.1",
"@nrwl/jest": "8.5.1",
"@nrwl/nest": "^8.5.1",
"@nrwl/node": "8.5.1",
"@nrwl/react": "^8.5.1",
"@nrwl/web": "8.5.1",
"@nrwl/workspace": "8.5.1",
"@testing-library/react": "8.0.5",
"@types/jest": "24.0.9",
"@types/node": "~8.9.4",
"@types/react": "16.9.1",
"@types/react-dom": "16.8.5",
"@types/react-router-dom": "4.3.5",
"@types/styled-components": "4.1.18",
"@typescript-eslint/eslint-plugin": "2.0.0-alpha.4",
"@typescript-eslint/parser": "2.0.0-alpha.4",
"cypress": "3.4.1",
"dotenv": "6.2.0",
"eslint": "6.1.0",
"eslint-config-prettier": "6.0.0",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-react": "7.14.3",
"eslint-plugin-react-hooks": "1.6.1",
"jest": "24.1.0",
"prettier": "1.18.2",
"ts-jest": "24.0.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.4.5"
}
}
Please provide any relevant information about your setup:
- version of Nx used:
8.5.1
- 3rd-party libraries and their versions
"rxfire": "^3.8.2",
"rxjs": "^6.5.3",
- and most importantly - a use-case that fails
Running e2e tests fails.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Since Angular 11.0.3, e2e tests produce error - Stack Overflow
Since 11.0.3 angular/core version, E2E tests are not working on a project with the default configuration.
Read more >Why and How to unit test angular applications - Halodoc Blog
The objective of this blog is to provide a complete understanding of why unit testing is important, how to set up your Angular...
Read more >Introduction to E2E Testing with the Angular CLI and Protractor
Our E2E test is using Jasmine. We first describe our E2E test. Then we import our Page Object class to use and create...
Read more >Testing Angular Services: A Walk-Through With Examples
If your project is starting to get testing under control, services are a great place ... import { map, catchError } from 'rxjs/operators';....
Read more >ng test - Angular
Option Description Value Type Defau...
‑‑browsers Override which browsers tests are run against. string
‑‑code‑coverage Output a code coverage report. boolean false
‑‑code‑coverage‑exclude Globs to exclude...
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
I have an update.
Talked to Ben Lesh and apparently the following fixes it: https://github.com/nrwl/nx/commit/a88ee635781e919779a0bad6ad43e97aa37a3d16
I’ll cut a release today with the fix.
I’m going to close this issue.
Update: it worked once I found out
resolutions
is ayarn
thing and I usedyarn install
.@vsavkin The
resolutions
fix doesn’t work for me. I thought the culprit wasredux-observable
(the only RxJS related dependency I can think of), but the error still shows up if I remove it thenrm -rf node_modules package-lock.json && npm i && npm run affected:e2e
.Full deps: