-
-
Notifications
You must be signed in to change notification settings - Fork 306
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
"at:" missing from diagnostic when file path starts with "file://" #601
Comments
I'm not sure how to turn this into a failing test case. Can you provide a |
@tbeseda ping, i'd love to address this |
Apologies, I've been neglecting my GH notifications. |
Looking at this again, I realized it's related to executing tests in an ESM environment. with CJS const test = require('tape')
test('test', function (t) {
t.plan(1)
t.equal('foobaz', 'foobar')
}) I get the expected output with the
with MJS import test from 'tape'
test('test', function (t) {
t.plan(1)
t.equal('foobaz', 'foobar')
}) I don't get the
this
|
aha, yes i'm sure that it's due to the regex expecting paths, while native ESM in node unfortunately uses URLs. I'll see what's possible - an actually correcct regex for a URL is probably impossible, but perhaps since this can only happen in a node that has a native |
Here's a sample of tape output without the
at:
entry in the diagnostics YAMLThe 4th line of the "stack" block should also be in the YAML as "at"
I believe it's this loop that sets the
Test.at
https://github.com/ljharb/tape/blob/5a776572cb7dcf46e32c493db716579e3bc5dc5d/lib/test.js#L523-L525I'm hesitant to wade into that regex 😬 but I can make an attempt if it's not an apparent/easy fix
🍻
The text was updated successfully, but these errors were encountered: