Skip to content

Unable to run npm test on fresh Codespace #68

@francisfuzz

Description

@francisfuzz

Summary

Hi Copilot team! I am interested in contributing to this repository. However, I am unable to run tests on fresh Codespace.

Steps to reproduce the issue:

  • Create a new Codespace from default branch (at time of writing: 8c434bc)
  • Run npm test

Expected

Tests run and pass!

Actual

Test scripts are run, but node tells me I have a "bad option":

@francisfuzz ➜ /workspaces/preview-sdk.js (main) $ npm test

> @copilot-extensions/preview-sdk@0.0.0-development test
> npm run test:code && npm run test:tsc && npm run test:types


> @copilot-extensions/preview-sdk@0.0.0-development test:code
> node --test --experimental-test-coverage --experimental-test-snapshots

node: bad option: --experimental-test-snapshots

Looking at the Node docs, it seems like this flag was introduced in v22.3.0.

However, checking Codespaces, I see that the installed Node version is behind:

@francisfuzz ➜ /workspaces/preview-sdk.js (main) $ node -v
v20.16.0

Would addressing this solely be a matter of having v22.x.x+ as a pinned node version? 💭

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions