Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot load mjs test files #1

Closed
skanaar opened this issue Feb 25, 2023 · 2 comments
Closed

Cannot load mjs test files #1

skanaar opened this issue Feb 25, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@skanaar
Copy link

skanaar commented Feb 25, 2023

The extension does not seem to support .mjs esmodule files.

Test output logs

worker1> starting /Users/redacted/test-test/module.test.mjs
worker1> 1..0 # no tests found

Content of module.test.mjs

import { test } from 'node:test'
import { strictEqual } from 'node:assert'

test('case A', async () => {
  console.log('success')
})

test('case B', async () => {
  strictEqual(true, false)
})

I can successfully run this test file with node --test

@connor4312
Copy link
Owner

Thanks for the issue, I just published 1.0.1 with the fix. (May take a minute to appear on the marketplace)

@connor4312 connor4312 added the bug Something isn't working label Feb 25, 2023
@connor4312 connor4312 self-assigned this Feb 25, 2023
@koistya
Copy link

koistya commented Aug 15, 2023

@connor4312 I have "type": "module" in my package.json, using .test.js file extension. The list of tests shows up fine in the explorer, but when I run them, it fails with the error:

worker1> starting /Users/User/Projects/example/example.test.js
worker1> 1..0 # no tests found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants