Skip to content

Commit

Permalink
for tests, only process ts/tsx files
Browse files Browse the repository at this point in the history
  • Loading branch information
arshaw committed Mar 29, 2021
1 parent dd4d502 commit fba064e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ exports.testsIndexWatch = testsIndexWatch

async function testsIndex() {
let res = exec2(
'find packages*/__tests__/src -mindepth 2 -type f -print0 | ' + // TODO: filter away non-ts/tsx files
"find packages*/__tests__/src -mindepth 2 -type f \\( -name '*.ts' -or -name '*.tsx' \\) -print0 | " +
'xargs -0 grep -E "(fdescribe|fit)\\("'
)

Expand All @@ -200,7 +200,7 @@ async function testsIndex() {
let files

if (!res.success) { // means there were no files that matched
let { stdout } = exec2('find packages*/__tests__/src -mindepth 2 -type f') // TODO: filter away non-ts/tsx files
let { stdout } = exec2("find packages*/__tests__/src -mindepth 2 -type f \\( -name '*.ts' -or -name '*.tsx' \\)")
files = stdout.trim()
files = !files ? [] : files.split('\n')
files = uniqStrs(files)
Expand Down

0 comments on commit fba064e

Please sign in to comment.