Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReferenceErrors when running tests in Docker #3190

Open
tespin opened this issue Jul 16, 2024 · 4 comments
Open

ReferenceErrors when running tests in Docker #3190

tespin opened this issue Jul 16, 2024 · 4 comments

Comments

@tespin
Copy link
Contributor

tespin commented Jul 16, 2024

p5.js version

2.14.0

What is your operating system?

Mac OS

Web browser and version

Firefox 122.0

Actual Behavior

npm run test fails on several test suites with the following errors:

ReferenceError: $RefreshSig$ is not defined
ReferenceError: $RefreshReg$ is not defined

Tests were run on a fresh Docker installation of the repo on the develop branch, using docker compose version v2.28.1-desktop.1.

Screenshot is attached but here are the affected test suites for me:

  • Modal.unit.test.jsx
  • Editor.unit.test.jsx
  • Nav.unit.test.jsx
  • Toast.test.jsx
  • EditorAccessibility.unit.test.jsx
  • Toolbar.unit.test.jsx
  • ErrorModal.unit.test.jsx
  • SketchList.unit.test.jsx
  • Preferences.unit.test.jsx
  • FileNode.unit.test.jsx
  • ButtonOrLink.unit.test.jsx
  • index.integration.test.jsx
Screenshot 2024-07-16 at 12 18 13 PM

Expected Behavior

Tests for affected components should run.

Steps to reproduce

Steps:

  1. Follow Docker installation instructions to set up dev environment.
  2. Open a terminal in the Docker server with docker compose -f docker-compose-development.yml exec app bash -l.
  3. Run npm run test.

It's my first time setting up p5 locally -- the app runs fine in my browser but I'm unsure how to troubleshoot these errors! Thanks for the help.

@tespin tespin added the Bug label Jul 16, 2024
Copy link

welcome bot commented Jul 16, 2024

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

@raclim
Copy link
Collaborator

raclim commented Jul 16, 2024

Thanks for raising this issue @tespin! I realized recently that some of the Docker setup isn't up to date since I don't use it too often 😅 so I'm sorry about any issues that you've been facing here!

I know that while our tests currently pass, they do have a few issues/warnings that pop up but will probably be addressed once the related components are refactored. However, I haven't encountered this error in particular, so I think it's probably stemming from how things are set up in the Docker configuration files. It also seems like this error is related to @pmmmwh/react-refresh-webpack-plugin, so the setup for this plugin may need to be adjusted as well. I'll try to take a further look into this and hopefully have an update by tomorrow!

@tespin tespin changed the title ReferenceErrors when running tests ReferenceErrors when running tests in Docker Jul 17, 2024
@tespin
Copy link
Contributor Author

tespin commented Jul 17, 2024

lol no worries! I was so stumped yesterday but will keep troubleshooting. I'll do the manual install in the meantime -- thanks for your attention @raclim.

@raclim
Copy link
Collaborator

raclim commented Jul 19, 2024

Sounds good, I'll try to keep looking into this as well! Thanks so much for being flexible!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants