question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Worker registered on different ports in Testcafe

See original GitHub issue

Describe the bug

i am now using msw in testcafe w/ no problems as of 0.20.4 (was thinking I should add a recipe for this to your docs, if you want let me know and I’ll open a PR).

However, when i upgrade to 0.20.5, it appears that mocking is not working.

Environment

  • msw: 0.20.4 & 5
  • nodejs: 12
  • yarn: latest

Please also provide your browser version. chrome latest

To Reproduce

Steps to reproduce the behavior:

  1. clone this branch of my repo: https://github.com/benmonro/msw-server/tree/msw-error
  2. yarn
  3. yarn testcafe note, it works w/ this version as it’s using 0.20.4
  4. yarn add -D msw@0.20.5
  5. see that tests fail, MSW doesn’t register, network requests all fail.

Expected behavior

A clear and concise description of what you expected to happen. mocks work. 😃

Screenshots

If applicable, add screenshots to help explain your problem.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:29 (29 by maintainers)

github_iconTop GitHub Comments

5reactions
benmonrocommented, Aug 13, 2020

oh btw @msutkowski that array.join hack totally works. LOVE IT (but yeah no) hahahaha. funny story, today at work my coworker got it to work using unicode characters haha. but then we tried it in prod mode and it failed, we’re guessing because webpack optimizes that out.

2reactions
benmonrocommented, Aug 28, 2020

Sgtm. I trust Matt.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration File | API | Docs - TestCafe
Specifies one or several browsers in which a test should run. You can use browser aliases to specify locally installed browsers. { "browsers":...
Read more >
Testcafe with variable server port - node.js - Stack Overflow
The server picks any free port, so port numbers are not constant over multiple test runs. How can I access the port number...
Read more >
Control Panel - TestCafe - DevExpress
Use the Network section to modify network settings (hostname, Control Panel Port, Service Port 1 and Service Port 2). If an auto detect...
Read more >
Chapter 9.5 - Custom TestController and Hooks
Chapter 2.1 - Install NodeJS , VS Code and TestCafe on macOS ... Chapter 7.4 - Implement Register Test with Page Model.
Read more >
Cross-Browser Acceptance Tests with LambdaTest and ...
You have to make sure that you have installed both browsers for this to work. The --app option is telling TestCafe to start...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found