(_test: Test, project: Project)
| 201 | }); |
| 202 | |
| 203 | function declareProject(_test: Test, project: Project) { |
| 204 | const test = |
| 205 | project.useTsNodeNext && !tsSupportsStableNodeNextNode16 |
| 206 | ? _test.skip |
| 207 | : _test; |
| 208 | test(`${project.identifier}`, async (t) => { |
| 209 | t.teardown(() => { |
| 210 | resetNodeEnvironment(); |
| 211 | }); |
| 212 | |
| 213 | const p = fsProject(project.identifier); |
| 214 | p.rm(); |
| 215 | |
| 216 | p.addJsonFile('package.json', { |
| 217 | type: project.typeModule ? 'module' : undefined, |
| 218 | }); |
| 219 | p.addJsonFile('tsconfig.json', { |
| 220 | 'ts-node': { |
| 221 | experimentalResolver: true, |
| 222 | preferTsExts: project.preferSrc, |
| 223 | transpileOnly: true, |
| 224 | experimentalSpecifierResolution: |
| 225 | project.experimentalSpecifierResolutionNode ? 'node' : undefined, |
| 226 | skipIgnore: project.skipIgnore, |
| 227 | } as RegisterOptions, |
| 228 | compilerOptions: { |
| 229 | allowJs: project.allowJs, |
| 230 | skipLibCheck: true, |
| 231 | // TODO add nodenext permutation |
| 232 | module: project.useTsNodeNext |
| 233 | ? 'NodeNext' |
| 234 | : project.typeModule |
| 235 | ? 'esnext' |
| 236 | : 'commonjs', |
| 237 | jsx: 'react', |
| 238 | target: 'esnext', |
| 239 | }, |
| 240 | }); |
| 241 | |
| 242 | const targets = generateTargets(project, p); |
| 243 | const entrypoints = generateEntrypoints(project, p, targets); |
| 244 | p.write(); |
| 245 | await execute(t, p, entrypoints); |
| 246 | }); |
| 247 | } |
| 248 | |
| 249 | // |
| 250 | // Generate all target-* files |
no test coverage detected
searching dependent graphs…