fix(frontend): fix react testing library migration (#1637)

This commit is contained in:
Jason Jean 2019-07-26 09:01:59 -04:00 committed by GitHub
parent df0e00d0dd
commit 2188077e13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,14 +96,14 @@ function updateDependencies(tree: Tree) {
}
function updateImports(host: Tree) {
let ig = ignore().add(['*', '!*.ts', '!*.tsx']); // include only .tsx? files
let ig = ignore();
if (host.exists('.gitignore')) {
ig = ig.add(host.read('.gitignore').toString());
}
host.visit(path => {
if (ig.ignores(relative('/', path))) {
if (ig.ignores(relative('/', path)) || !/\.tsx?$/.test(path)) {
return;
}