Skip to content

Commit ea8bdb4

Browse files
committed
test_runner: support typescript files in default glob
1 parent 96ec7ee commit ea8bdb4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/internal/test_runner/utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ const kMultipleCallbackInvocations = 'multipleCallbackInvocations';
5454
const kRegExpPattern = /^\/(.*)\/([a-z]*)$/;
5555

5656
const kPatterns = ['test', 'test/**/*', 'test-*', '*[._-]test'];
57-
const kDefaultPattern = `**/{${ArrayPrototypeJoin(kPatterns, ',')}}.?(c|m)js`;
57+
const kFileExtension = getOptionValue('--experimental-strip-types') ? '(c|m)(t|j)s' : '(c|m)js';
58+
const kDefaultPattern = `**/{${ArrayPrototypeJoin(kPatterns, ',')}}.?${kFileExtension}`;
5859

5960

6061
function createDeferredCallback() {

0 commit comments

Comments
 (0)