Skip to content

Commit 60f4e6e

Browse files
committed
test: add test for resolveDeclarationReference
1 parent 8dd8714 commit 60f4e6e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { fromPartial } from "@total-typescript/shoehorn";
2+
import { expect, test } from "vitest";
3+
import { resolveDeclarationReference } from "./resolve-declaration-reference";
4+
5+
test("resolveDeclarationReference", () => {
6+
expect(
7+
resolveDeclarationReference(
8+
fromPartial({
9+
packageName: "foo",
10+
memberReferences: [
11+
fromPartial({
12+
memberIdentifier: fromPartial({
13+
identifier: "bar",
14+
}),
15+
}),
16+
fromPartial({
17+
memberIdentifier: fromPartial({
18+
identifier: "baz",
19+
}),
20+
}),
21+
],
22+
}),
23+
),
24+
).toMatchInlineSnapshot(`
25+
{
26+
"declarationId": "bar.baz",
27+
"pkgName": "foo",
28+
}
29+
`);
30+
});

0 commit comments

Comments
 (0)