Skip to content

Commit

Permalink
fix(tools): conditionally add testing subfolder to tsconfig include g…
Browse files Browse the repository at this point in the history
…lob in migrate-converged-pkg (#25493)
  • Loading branch information
TristanWatanabe authored Nov 3, 2022
1 parent f5a12b3 commit 176464a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 0 additions & 2 deletions tools/generators/migrate-converged-pkg/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,6 @@ describe('migrate-converged-pkg generator', () => {
'**/*.test.js',
'**/*.test.jsx',
'**/*.d.ts',
'./src/testing/**/*.js',
'./src/testing/**/*.jsx',
]);
});

Expand Down
14 changes: 5 additions & 9 deletions tools/generators/migrate-converged-pkg/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,17 +262,13 @@ const templates = {
outDir: 'dist',
types: ['jest', 'node'],
} as TsConfig['compilerOptions'],
include: [
'**/*.spec.ts',
'**/*.spec.tsx',
'**/*.test.ts',
'**/*.test.tsx',
'**/*.d.ts',
'./src/testing/**/*.ts',
'./src/testing/**/*.tsx',
],
include: ['**/*.spec.ts', '**/*.spec.tsx', '**/*.test.ts', '**/*.test.tsx', '**/*.d.ts'],
};

if (options.hasConformance) {
tsConfig.include.push('./src/testing/**/*.ts', './src/testing/**/*.tsx');
}

if (options.js) {
tsConfig.include = globsToJs(tsConfig.include);
}
Expand Down

0 comments on commit 176464a

Please sign in to comment.