From 8003791d9f10d4b3e16454c6a92e638cdbd65628 Mon Sep 17 00:00:00 2001 From: Jesse Trinity Date: Fri, 15 May 2020 11:45:49 -0700 Subject: [PATCH] add unit test --- .../unittests/services/organizeImports.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/testRunner/unittests/services/organizeImports.ts b/src/testRunner/unittests/services/organizeImports.ts index 627928c03e8..66f78c11e54 100644 --- a/src/testRunner/unittests/services/organizeImports.ts +++ b/src/testRunner/unittests/services/organizeImports.ts @@ -591,6 +591,22 @@ import "lib1"; }, { path: "/lib1.ts", content: "" }, { path: "/lib2.ts", content: "" }); + + testOrganizeImports("SortComments", + { + path: "/test.ts", + content: ` +// Header +import "lib3"; +// Comment2 +import "lib2"; +// Comment1 +import "lib1"; +`, + }, + { path: "/lib1.ts", content: "" }, + { path: "/lib2.ts", content: "" }, + { path: "/lib3.ts", content: "" }); testOrganizeImports("AmbientModule", {