processing / processing/p5.js-web-editor

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

Open
#3,978 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
JavaScript
Stars
1.7k
Forks
1.7k
Avg merge
3d 4h
Merged PRs (30d)
8

Description

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 :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in package.json by reviewing the test and test:watch scripts and their NODE_ENV assignment. Run npm run test on a Windows shell and a Unix-like shell to compare behavior. Done means both commands launch Jest successfully with NODE_ENV=test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.