Skip to content

Commit 426c952

Browse files
Fix tests for match not actually running
1 parent 3c7421b commit 426c952

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/util.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function match<T extends string | number, Arms extends T, Out>(
3636
}
3737

3838
// Some tests for `match`
39-
(() => {
39+
const _dummy0 = () => {
4040
type Animal = "cat" | "dog" | "fox";
4141
type SmallNumber = 1 | 2 | 3;
4242

@@ -60,7 +60,7 @@ export function match<T extends string | number, Arms extends T, Out>(
6060
const _w: string = match(1 as SmallNumber, { 1: () => "a", 2: () => "b" });
6161
// @ts-expect-error: is nullable
6262
const _v: string = match(1 as number, { 1: () => "a", 2: () => "b" });
63-
})();
63+
};
6464

6565
/**
6666
* Similar to `match` for when you need to narrow a type depending on a tag.
@@ -97,7 +97,7 @@ export function matchTag<
9797
}
9898

9999
// Some tests for `matchTag`
100-
(() => {
100+
const _dummy1 = () => {
101101
type Foo = { kind: "foo", age: number }
102102
| { kind: "bar", name: string };
103103

@@ -120,7 +120,7 @@ export function matchTag<
120120
const s = { kind: "foo", name: "Peter" } as Stringy;
121121
// @ts-expect-error: incomplete arms for string tag
122122
matchTag(s, "kind", { foo: () => true });
123-
})();
123+
};
124124

125125

126126
/** CSS Media query for screens with widths ≤ `w` */

0 commit comments

Comments
 (0)