Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(client-runtime): highlight Node eval scripts after diagnostic path options #48253

Opensaphid(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/48253/headopened View on GitHub

Showing 2 changed files with 21 additions and 0 deletions.

x
0 of 2 viewed, 2 left
17 additions and 0 deletionspackages/client-runtime/src/work-log/embeddedScripts.test.tsModified
View file
@@ -216,6 +216,23 @@
expect(scriptsOf(command)).toEqual([[language, script, expect.any(String)]]);
});
​
+ it("finds Node eval scripts after diagnostic path options", () => {
+ const options = [
+ ["--diagnostic-dir", "/tmp"],
+ ["--openssl-config", "/dev/null"],
+ ["--report-dir", "/tmp"],
+ ["--report-directory", "/tmp"],
+ ];
+ for (const [option, path] of options) {
+ for (const separator of [" ", "="]) {
+ const command = `node ${option}${separator}${path} -e 'console.log(42)'`;
+ expect
+ .soft(scriptsOf(command), command)
+ .toEqual([["javascript", "console.log(42)", "console.log(42)"]]);
+ }
+ }
+ });
+​
it.each([
`perl -e'print 1;' -E 'say 2'`,
4 additions and 0 deletionspackages/client-runtime/src/work-log/embeddedScripts.tsModified
View file
@@ -140,6 +140,10 @@
"--disable-warning",