Skip to content

Tests are failing in Windows due to command line env syntax #4842

@aarontravass

Description

@aarontravass

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the issue has not already been raised

Issue

Running npm run test fails because the env syntax is different on windows and unix systems. Following is the error

C:\Users\aaron\Documents\projects\fastify>npm run test

> fastify@4.18.0 test
> npm run lint && NODE_OPTIONS=no-network-family-autoselection npm run unit && npm run test:typescript


> fastify@4.18.0 lint
> npm run lint:standard && npm run lint:typescript && npm run lint:markdown


> fastify@4.18.0 lint:standard
> standard | snazzy


> fastify@4.18.0 lint:typescript
> eslint -c types/.eslintrc.json types/**/*.d.ts test/types/**/*.test-d.ts


> fastify@4.18.0 lint:markdown
> markdownlint-cli2

markdownlint-cli2 v0.5.1 (markdownlint v0.26.2)
'NODE_OPTIONS' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\aaron\Documents\projects\fastify>

Solution:

Use a platform agnostic solution to set env

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions