Merge pull request #17257 from armanio123/FixNodeModulesTodos

Added node_modules path check on getTodoComments method.
This commit is contained in:
Armando Aguirre
2017-07-20 14:58:36 -07:00
committed by GitHub
4 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
/// <reference path='fourslash.ts' />
// Tests node_modules name in file still gets todos.
// @Filename: /node_modules_todoTest0.ts
//// // [|TODO|]
verify.todoCommentsInCurrentFile(["TODO"]);

View File

@@ -0,0 +1,11 @@
/// <reference path='fourslash.ts' />
// Tests that todos are not found in node_modules folder.
// @Filename: todoTest0.ts
//// import * as foo1 from "fake-module";
// @Filename: node_modules/fake-module/ts.ts
//// // TODO
verify.todoCommentsInCurrentFile(["TODO"]);

View File

@@ -0,0 +1,6 @@
/// <reference path='fourslash.ts' />
// @Filename: dir1/node_modules/todoTest0.ts
//// // TODO
verify.todoCommentsInCurrentFile(["TODO"]);