• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1namespace ts {
2    describe("unittests:: tsc:: redirect::", () => {
3        verifyTsc({
4            scenario: "redirect",
5            subScenario: "when redirecting ts file",
6            fs: () => loadProjectFromFiles({
7                "/src/project/tsconfig.json": JSON.stringify({
8                    compilerOptions: {
9                        outDir: "out"
10                    },
11                    include: [
12                        "copy1/node_modules/target/*",
13                        "copy2/node_modules/target/*",
14                    ]
15                }),
16                "/src/project/copy1/node_modules/target/index.ts": "export const a = 1;",
17                "/src/project/copy1/node_modules/target/import.ts": `import {} from "./";`,
18                "/src/project/copy1/node_modules/target/package.json": JSON.stringify({
19                    name: "target",
20                    version: "1.0.0",
21                    main: "index.js",
22                }),
23                "/src/project/copy2/node_modules/target/index.ts": "export const a = 1;",
24                "/src/project/copy2/node_modules/target/import.ts": `import {} from "./";`,
25                "/src/project/copy2/node_modules/target/package.json": JSON.stringify({
26                    name: "target",
27                    version: "1.0.0",
28                    main: "index.js",
29                }),
30            }),
31            commandLineArgs: ["-p", "src/project"],
32        });
33    });
34}
35