TypeScript/tests/cases/fourslash/importNameCodeFix_getCanonicalFileName.ts
Andy 304d45d833
Canonicalize path before calling startsWith (#25364)
* Canonicalize path before calling `startsWith`

* More specific type for sourceDirectory, and add fourslash test

* Update API (#24966)
2018-07-03 11:23:19 -07:00

17 lines
361 B
TypeScript

/// <reference path="fourslash.ts" />
// @Filename: /howNow/node_modules/brownCow/index.d.ts
////export const foo: number;
// @Filename: /howNow/a.ts
////foo;
// Before fixing this bug, we compared a canonicalized `hownow` to a non-canonicalized `howNow`.
goTo.file("/howNow/a.ts");
verify.importFixAtPosition([
`import { foo } from "brownCow";
foo;`,
]);