From 6282c9fb5e2097c86f44ee67da872423df1c1d5c Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Thu, 6 Jun 2019 10:55:56 -0700 Subject: [PATCH] Add test for semicolon detection in auto-import --- .../completionsImport_noSemicolons.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/cases/fourslash/completionsImport_noSemicolons.ts diff --git a/tests/cases/fourslash/completionsImport_noSemicolons.ts b/tests/cases/fourslash/completionsImport_noSemicolons.ts new file mode 100644 index 0000000000..f1e183b8b3 --- /dev/null +++ b/tests/cases/fourslash/completionsImport_noSemicolons.ts @@ -0,0 +1,20 @@ +/// + +// @Filename: /a.ts +////export function foo() {} + +// @Filename: /b.ts +////const x = 0 +////const y = 1 +////const z = fo/**/ + +verify.applyCodeActionFromCompletion("", { + name: "foo", + source: "/a", + description: `Import 'foo' from module "./a"`, + newFileContent: `import { foo } from "./a" + +const x = 0 +const y = 1 +const z = fo`, +});