Skip to content

Commit

Permalink
Merge branch 'main' into upg-marked-terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTail committed Aug 7, 2024
2 parents 02081d0 + 782c640 commit b8b4194
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions packages/cli/test/snapshots.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe("snapshots", async () => {
});

for (const [tarball, options] of tests) {
const fixture = tarball + (options ? ` ${options.replace(/ .*[\\\/](?=[^\\\/]*$)/g, " ")}` : "");
const fixture = tarball + (options ? ` ${stripPaths(options)}` : "");
if (testFilter && !fixture.toLowerCase().includes(testFilter)) {
continue;
}
Expand All @@ -88,7 +88,7 @@ describe("snapshots", async () => {
`# ${fixture}`,
"",
"```",
`$ attw ${tarball} ${options ?? defaultOpts}`,
`$ attw ${tarball} ${stripPaths(options ?? defaultOpts)}`,
"",
[stdout, stderr].filter(Boolean).join("\n"),
"",
Expand Down Expand Up @@ -116,3 +116,7 @@ describe("snapshots", async () => {
});
}
});

function stripPaths(input: string): string {
return input.replace(/ .*[\\\/](?=[^\\\/]*$)/g, " ");
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# [email protected] --definitely-typed @[email protected]

```
$ attw [email protected] --definitely-typed /Users/andrew/Developer/arethetypeswrong.github.io/packages/core/test/fixtures/@[email protected]
$ attw [email protected] --definitely-typed @[email protected]
big.js v6.2.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# [email protected] --definitely-typed @[email protected]

```
$ attw [email protected] --definitely-typed /Users/andrew/Developer/arethetypeswrong.github.io/packages/core/test/fixtures/@[email protected]
$ attw [email protected] --definitely-typed @[email protected]
react v18.2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# [email protected] --include-entrypoints foo -f ascii

```
$ attw [email protected] --include-entrypoints ./foo -f ascii
$ attw [email protected] --include-entrypoints foo -f ascii
vue v3.3.4
Expand Down

0 comments on commit b8b4194

Please sign in to comment.