Skip to content

Tests not runnable on running npm run test ( NODE_ENV not recognized) #3978

@Jatin24062005

Description

@Jatin24062005

p5.js version

No response

What is your operating system?

None

Web browser and version

No response

Actual Behavior

The test and test:watch scripts in package.json use NODE_ENV=test jest directly. This syntax works on macOS/Linux shells but fails on Windows (CMD, PowerShell, Git Bash). As a result, tests cannot be executed on Windows machines.

  • On Windows, running:
    npm run test
    produces:
    'NODE_ENV' is not recognized as an internal or external command,
    operable program or batch file.
    
  • This makes tests not runnable on Windows environments.
Image

Expected Behavior

  • Running:
    npm run test
    should start Jest with NODE_ENV=test set correctly.
  • Tests should run successfully across all operating systems.

Steps to reproduce

Steps:

1.Clone the repo on a Windows machine.
2. Run npm install
3.Run npm run test

Snippet:

// Paste your code here :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting Maintainer ApprovalNeeds review from a maintainer before moving forwardBugError or unexpected behaviors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions