MCPcopy Index your code
hub / github.com/TypeScriptToLua/TypeScriptToLua / findAndExpect

Function findAndExpect

test/cli/tsconfig.spec.ts:28–35  ·  view source on GitHub ↗
(project: string, expected: string)

Source from the content-addressed store, hash-verified

26 for (const separator of process.platform === "win32" ? ["/", "\\"] : ["/"]) {
27 for (const pointsTo of ["file", "directory"] as const) {
28 const findAndExpect = (project: string, expected: string) => {
29 project = project.replace(/[\\/]/g, separator);
30 if (pointsTo === "directory") {
31 project = path.dirname(project);
32 }
33
34 expect(locate(project)).toBe(normalize(expected));
35 };
36
37 test(`relative to ${pointsTo} separated with '${separator}'`, async () => {
38 await fs.outputFile("tsconfig.json", "");

Callers 1

tsconfig.spec.tsFile · 0.85

Calls 3

expectFunction · 0.85
locateFunction · 0.85
normalizeFunction · 0.70

Tested by

no test coverage detected