Skip to content

Commit b8b4194

Browse files
committed
Merge branch 'main' into upg-marked-terminal
2 parents 02081d0 + 782c640 commit b8b4194

4 files changed

+9
-5
lines changed

packages/cli/test/snapshots.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe("snapshots", async () => {
6262
});
6363

6464
for (const [tarball, options] of tests) {
65-
const fixture = tarball + (options ? ` ${options.replace(/ .*[\\\/](?=[^\\\/]*$)/g, " ")}` : "");
65+
const fixture = tarball + (options ? ` ${stripPaths(options)}` : "");
6666
if (testFilter && !fixture.toLowerCase().includes(testFilter)) {
6767
continue;
6868
}
@@ -88,7 +88,7 @@ describe("snapshots", async () => {
8888
`# ${fixture}`,
8989
"",
9090
"```",
91-
`$ attw ${tarball} ${options ?? defaultOpts}`,
91+
`$ attw ${tarball} ${stripPaths(options ?? defaultOpts)}`,
9292
"",
9393
[stdout, stderr].filter(Boolean).join("\n"),
9494
"",
@@ -116,3 +116,7 @@ describe("snapshots", async () => {
116116
});
117117
}
118118
});
119+
120+
function stripPaths(input: string): string {
121+
return input.replace(/ .*[\\\/](?=[^\\\/]*$)/g, " ");
122+
}

packages/cli/test/snapshots/big.js@6.2.1.tgz --definitely-typed @types__big.js@6.2.0.tgz.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# big.js@6.2.1.tgz --definitely-typed @types__big.js@6.2.0.tgz
22

33
```
4-
$ attw big.js@6.2.1.tgz --definitely-typed /Users/andrew/Developer/arethetypeswrong.github.io/packages/core/test/fixtures/@types__big.js@6.2.0.tgz
4+
$ attw big.js@6.2.1.tgz --definitely-typed @types__big.js@6.2.0.tgz
55
66
77
big.js v6.2.1

packages/cli/test/snapshots/react@18.2.0.tgz --definitely-typed @types__react@18.2.21.tgz.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# react@18.2.0.tgz --definitely-typed @types__react@18.2.21.tgz
22

33
```
4-
$ attw react@18.2.0.tgz --definitely-typed /Users/andrew/Developer/arethetypeswrong.github.io/packages/core/test/fixtures/@types__react@18.2.21.tgz
4+
$ attw react@18.2.0.tgz --definitely-typed @types__react@18.2.21.tgz
55
66
77
react v18.2.0

packages/cli/test/snapshots/vue@3.3.4.tgz --include-entrypoints foo -f ascii.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# vue@3.3.4.tgz --include-entrypoints foo -f ascii
22

33
```
4-
$ attw vue@3.3.4.tgz --include-entrypoints ./foo -f ascii
4+
$ attw vue@3.3.4.tgz --include-entrypoints foo -f ascii
55
66
77
vue v3.3.4

0 commit comments

Comments
 (0)