-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
test: add ts eval snapshots #56358
test: add ts eval snapshots #56358
Conversation
Review requested:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #56358 +/- ##
==========================================
- Coverage 88.54% 88.53% -0.01%
==========================================
Files 657 657
Lines 190738 190719 -19
Branches 36607 36603 -4
==========================================
- Hits 168886 168862 -24
- Misses 15026 15033 +7
+ Partials 6826 6824 -2
|
0986177
to
be5e243
Compare
Its a real failure on windows arm64 😭😭😭😭😭 |
be5e243
to
f9e7cc4
Compare
f9e7cc4
to
0c6a364
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
const evalFunction = () => runScriptInContext(name, | ||
body, | ||
breakFirstLine, | ||
print, | ||
module, | ||
baseUrl, | ||
undefined, | ||
origModule); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What the heck is happening here?
const evalFunction = () => runScriptInContext(name, | |
body, | |
breakFirstLine, | |
print, | |
module, | |
baseUrl, | |
undefined, | |
origModule); | |
const evalFunction = () => runScriptInContext( | |
name, | |
body, | |
breakFirstLine, | |
print, | |
module, | |
baseUrl, | |
undefined, | |
origModule, | |
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its the formatter 🤷 I run make lint-js-fix
and it formats it that way
const evalFunction = () => runScriptInContext(name, | ||
sourceToRun, | ||
breakFirstLine, | ||
print, | ||
module, | ||
baseUrl, | ||
compiledScript, | ||
origModule); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
const evalFunction = () => runScriptInContext(name, | |
sourceToRun, | |
breakFirstLine, | |
print, | |
module, | |
baseUrl, | |
compiledScript, | |
origModule); | |
const evalFunction = () => runScriptInContext( | |
name, | |
sourceToRun, | |
breakFirstLine, | |
print, | |
module, | |
baseUrl, | |
compiledScript, | |
origModule, | |
); |
'const foo: string = 10;', | ||
'function foo(){};foo<Number>(1);', | ||
'interface Foo{};const foo;', | ||
'function foo(){ await Promise.resolve(1)};', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this seems a bit convoluted
'function foo(){ await Promise.resolve(1)};', | |
'async function foo(){ return 1 };', |
or
'function foo(){ await Promise.resolve(1)};', | |
'const foo = async () => 1;', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its not the same thing, its convoluted to create a syntax error
PR-URL: #56358 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Jacob Smith <[email protected]>
Landed in d2af881...b3f82fe |
PR-URL: #56358 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Jacob Smith <[email protected]>
PR-URL: #56358 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Jacob Smith <[email protected]>
Some light refactoring and printing error message from
--eval
with ts