Skip to content

ReferenceErrors when running tests in Docker #3190

Closed
@tespin

Description

@tespin

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions