Skip to content

Tests do not work on Windows (with potential solution) #75

@DawMatt

Description

@DawMatt

The current npm test results in the following when executing on Windows:

'.' is not recognized as an internal or external command, operable program or batch file.

Changing the current scripts from:

  "scripts": {
    "test": "./node_modules/.bin/spectral lint examples/valid/* -r ./.spectral.yml",
    "prepare": "husky install"
  },

to

  "scripts": {
    "test": "spectral lint examples/valid/* -r ./.spectral.yml",
    "prepare": "husky install"
  },

fixes the problem on Windows. I'm currently unable to test this on Unix right now, but believe this should also work there as ./node_modules/.bin is apparently added to the start of the PATH by node or npm.

Note: I haven't PRed this as I need someone to verify it won't break compatibility on other platforms first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions