(
t: ExecutionContext<ctxTsNode.Ctx>,
compilerOptions: CreateOptions['compilerOptions'],
allowed: string[]
)
| 1046 | |
| 1047 | test.suite('issue #1098', (test) => { |
| 1048 | function testAllowedExtensions( |
| 1049 | t: ExecutionContext<ctxTsNode.Ctx>, |
| 1050 | compilerOptions: CreateOptions['compilerOptions'], |
| 1051 | allowed: string[] |
| 1052 | ) { |
| 1053 | const disallowed = allExtensions.filter((ext) => !allowed.includes(ext)); |
| 1054 | const { ignored } = t.context.tsNodeUnderTest.create({ |
| 1055 | compilerOptions, |
| 1056 | skipProject: true, |
| 1057 | }); |
| 1058 | for (const ext of allowed) { |
| 1059 | t.log(`Testing that ${ext} files are allowed`); |
| 1060 | expect(ignored(join(DIST_DIR, `index${ext}`))).toBe(false); |
| 1061 | } |
| 1062 | for (const ext of disallowed) { |
| 1063 | t.log(`Testing that ${ext} files are ignored`); |
| 1064 | expect(ignored(join(DIST_DIR, `index${ext}`))).toBe(true); |
| 1065 | } |
| 1066 | } |
| 1067 | |
| 1068 | const allExtensions = [ |
| 1069 | '.ts', |
no test coverage detected
searching dependent graphs…