Skip to content

Commit 3505fb9

Browse files
Add passing test case...
1 parent 2e797c8 commit 3505fb9

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/// <reference path="fourslash.ts"/>
2+
3+
// @Filename: /src/main.ts
4+
////import { message } from "./message.js";
5+
////
6+
////[|export function someLibFn(): string {
7+
//// return main();
8+
////}|]
9+
////
10+
////function main(): string {
11+
//// return message;
12+
////}
13+
////console.log(someLibFn());
14+
15+
// @Filename: /message.ts
16+
////export const message = "hello world";
17+
18+
// @Filename: /other.ts
19+
////import { someLibFn } from "./src/main.js";
20+
////
21+
////function someOtherFn(): string {
22+
//// return someLibFn();
23+
////}
24+
25+
// @Filename: /act/action.ts
26+
////import { someLibFn } from "../src/main.js";
27+
////
28+
////function doAction(): string {
29+
//// return someLibFn();
30+
////}
31+
32+
33+
verify.moveToNewFile({
34+
newFileContents: {
35+
"/src/main.ts":
36+
`import { message } from "./message.js";
37+
import { someLibFn } from "./someLibFn.js";
38+
39+
export function main(): string {
40+
return message;
41+
}
42+
console.log(someLibFn());`,
43+
44+
"/src/someLibFn.ts":
45+
`import { main } from "./main.js";
46+
47+
48+
export function someLibFn(): string {
49+
return main();
50+
}
51+
`,
52+
53+
"/other.ts":
54+
`import { someLibFn } from "./src/someLibFn.js";
55+
56+
function someOtherFn(): string {
57+
return someLibFn();
58+
}`,
59+
60+
"/act/action.ts":
61+
`import { someLibFn } from "../src/someLibFn.js";
62+
63+
function doAction(): string {
64+
return someLibFn();
65+
}`,
66+
}
67+
});

0 commit comments

Comments
 (0)