mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-25 05:29:07 -05:00
Merge pull request #17257 from armanio123/FixNodeModulesTodos
Added node_modules path check on getTodoComments method.
This commit is contained in:
8
tests/cases/fourslash/todoComments18.ts
Normal file
8
tests/cases/fourslash/todoComments18.ts
Normal 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"]);
|
||||
11
tests/cases/fourslash/todoComments19.ts
Normal file
11
tests/cases/fourslash/todoComments19.ts
Normal 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"]);
|
||||
6
tests/cases/fourslash/todoComments20.ts
Normal file
6
tests/cases/fourslash/todoComments20.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: dir1/node_modules/todoTest0.ts
|
||||
//// // TODO
|
||||
|
||||
verify.todoCommentsInCurrentFile(["TODO"]);
|
||||
Reference in New Issue
Block a user