(typescript = false)
| 52 | }); |
| 53 | |
| 54 | function confirmBlueprinted(typescript = false) { |
| 55 | if (isExperimentEnabled('VITE')) { |
| 56 | confirmViteBlueprint(); |
| 57 | return; |
| 58 | } |
| 59 | |
| 60 | let blueprintPath = path.join(path.dirname(require.resolve('@ember-tooling/classic-build-app-blueprint')), 'files'); |
| 61 | // ignore TypeScript files |
| 62 | let expected = walkSync(blueprintPath, { |
| 63 | ignore: ['tsconfig.json', 'types', 'app/config'], |
| 64 | }).map((name) => (typescript ? name : name.replace(/\.ts$/, '.js'))); |
| 65 | |
| 66 | // This style of assertion can't handle conditionally available files |
| 67 | if (expected.some((x) => x.endsWith('eslint.config.mjs'))) { |
| 68 | expected = [...expected.filter((x) => !x.endsWith('eslint.config.mjs')), 'eslint.config.mjs']; |
| 69 | } |
| 70 | // GJS and GTS files are also conditionally available |
| 71 | expected = expected.filter((x) => !x.endsWith('.gjs') && !x.endsWith('.gts')); |
| 72 | |
| 73 | expected.sort(); |
| 74 | |
| 75 | let actual = walkSync('.').sort(); |
| 76 | |
| 77 | Object.keys(Blueprint.renamedFiles).forEach((srcFile) => { |
| 78 | expected[expected.indexOf(srcFile)] = Blueprint.renamedFiles[srcFile]; |
| 79 | }); |
| 80 | |
| 81 | removeIgnored(expected); |
| 82 | removeIgnored(actual); |
| 83 | |
| 84 | removeTmp(expected); |
| 85 | removeTmp(actual); |
| 86 | |
| 87 | expected.sort(); |
| 88 | |
| 89 | expect(expected).to.deep.equal( |
| 90 | actual, |
| 91 | `${EOL} expected: ${util.inspect(expected)}${EOL} but got: ${util.inspect(actual)}` |
| 92 | ); |
| 93 | } |
| 94 | |
| 95 | function confirmGlobBlueprinted(pattern) { |
| 96 | let blueprintPath = path.join(path.dirname(require.resolve('@ember-tooling/classic-build-app-blueprint')), 'files'); |
no test coverage detected
searching dependent graphs…