@ember/app-blueprint 0.0.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/.editorconfig +19 -0
  2. package/.github/workflows/ci.yml +35 -0
  3. package/.github/workflows/plan-release.yml +94 -0
  4. package/.github/workflows/publish.yml +43 -0
  5. package/.prettierrc.cjs +13 -0
  6. package/.release-plan.json +18 -0
  7. package/CHANGELOG.md +29 -0
  8. package/RELEASE.md +27 -0
  9. package/eslint.config.mjs +30 -0
  10. package/files/.editorconfig +19 -0
  11. package/files/.ember-cli +7 -0
  12. package/files/.github/workflows/ci.yml +53 -0
  13. package/files/.prettierignore +13 -0
  14. package/files/.prettierrc.js +39 -0
  15. package/files/.stylelintignore +5 -0
  16. package/files/.stylelintrc.js +5 -0
  17. package/files/.template-lintrc.js +5 -0
  18. package/files/.watchmanconfig +3 -0
  19. package/files/README.md +58 -0
  20. package/files/_js_babel.config.cjs +42 -0
  21. package/files/_js_eslint.config.mjs +115 -0
  22. package/files/_ts_babel.config.cjs +50 -0
  23. package/files/_ts_eslint.config.mjs +135 -0
  24. package/files/app/app.ts +18 -0
  25. package/files/app/components/.gitkeep +0 -0
  26. package/files/app/config/environment.ts +17 -0
  27. package/files/app/controllers/.gitkeep +0 -0
  28. package/files/app/deprecation-workflow.ts +24 -0
  29. package/files/app/helpers/.gitkeep +0 -0
  30. package/files/app/models/.gitkeep +0 -0
  31. package/files/app/router.ts +11 -0
  32. package/files/app/routes/.gitkeep +0 -0
  33. package/files/app/styles/app.css +1 -0
  34. package/files/app/templates/_js_application.hbs +10 -0
  35. package/files/app/templates/_ts_application.gts +15 -0
  36. package/files/config/ember-cli-update.json +16 -0
  37. package/files/config/environment.js +48 -0
  38. package/files/config/optional-features.json +7 -0
  39. package/files/config/targets.js +11 -0
  40. package/files/ember-cli-build.js +22 -0
  41. package/files/gitignore +26 -0
  42. package/files/index.html +29 -0
  43. package/files/package.json +112 -0
  44. package/files/public/robots.txt +3 -0
  45. package/files/testem.js +25 -0
  46. package/files/tests/helpers/index.ts +43 -0
  47. package/files/tests/index.html +43 -0
  48. package/files/tests/integration/.gitkeep +0 -0
  49. package/files/tests/test-helper.ts +15 -0
  50. package/files/tests/unit/.gitkeep +0 -0
  51. package/files/tsconfig.json +31 -0
  52. package/files/vite.config.mjs +15 -0
  53. package/index.js +158 -0
  54. package/lib/directory-for-package-name.js +31 -0
  55. package/lib/prepend-emoji.js +12 -0
  56. package/package.json +33 -6
  57. package/tests/default.test.mjs +145 -0
  58. package/tests/fixture/app/components/custom-component.hbs +3 -0
  59. package/tests/fixture/app/initializers/test-init.js +6 -0
  60. package/tests/fixture/app/instance-initializers/test-instance-init.js +6 -0
  61. package/tests/fixture/app/router.js +12 -0
  62. package/tests/fixture/app/routes/styles.js +6 -0
  63. package/tests/fixture/app/styles/app.css +5 -0
  64. package/tests/fixture/app/templates/application.hbs +3 -0
  65. package/tests/fixture/app/templates/custom-component.hbs +1 -0
  66. package/tests/fixture/app/templates/index.hbs +1 -0
  67. package/tests/fixture/app/templates/styles.hbs +5 -0
  68. package/tests/fixture/testem-proxy.js +35 -0
  69. package/tests/fixture/tests/acceptance/app-init-test.js +13 -0
  70. package/tests/fixture/tests/acceptance/custom-component-test.js +14 -0
  71. package/tests/fixture/tests/acceptance/styles-test.js +18 -0
  72. package/tests/fixture/tests/acceptance/welcome-page-test.js +14 -0
  73. package/tests/fixture-ts/app/initializers/test-init.ts +10 -0
  74. package/tests/fixture-ts/app/instance-initializers/test-instance-init.ts +10 -0
  75. package/tests/fixture-ts/app/router.ts +12 -0
  76. package/tests/fixture-ts/app/routes/styles.ts +8 -0
  77. package/tests/fixture-ts/app/styles/app.css +5 -0
  78. package/tests/fixture-ts/app/templates/components/custom.gts +5 -0
  79. package/tests/fixture-ts/app/templates/custom-component.gts +5 -0
  80. package/tests/fixture-ts/app/templates/index.gts +5 -0
  81. package/tests/fixture-ts/app/templates/styles.gts +7 -0
  82. package/tests/fixture-ts/testem-proxy.js +36 -0
  83. package/tests/fixture-ts/tests/acceptance/app-init-test.ts +22 -0
  84. package/tests/fixture-ts/tests/acceptance/custom-component-test.ts +14 -0
  85. package/tests/fixture-ts/tests/acceptance/styles-test.ts +18 -0
  86. package/tests/fixture-ts/tests/acceptance/welcome-page-test.ts +14 -0
  87. package/tests/helpers.mjs +57 -0
  88. package/tests/typescript.test.mjs +24 -0
  89. package/vitest.config.ts +10 -0
@@ -0,0 +1,145 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { join } from 'path';
3
+ import { existsSync, writeFileSync } from 'fs';
4
+ import stripAnsi from 'strip-ansi';
5
+ import { newProjectWithFixtures } from './helpers.mjs';
6
+
7
+ const SCENARIOS = [
8
+ {
9
+ flags: [
10
+ /* none, default */
11
+ ],
12
+ fixturePath: join(import.meta.dirname, 'fixture'),
13
+ },
14
+ {
15
+ flags: ['--typescript'],
16
+ fixturePath: join(import.meta.dirname, 'fixture-ts'),
17
+ },
18
+ ];
19
+
20
+ describe('basic functionality', function () {
21
+ for (let { flags, fixturePath } of SCENARIOS) {
22
+ describe(`with flags: '${flags.join(' ')}'`, function () {
23
+ let project = newProjectWithFixtures({
24
+ fixturePath,
25
+ flags,
26
+ });
27
+
28
+ it('verify files', async function () {
29
+ expect(
30
+ !existsSync(join(project.dir(), 'app/index.html')),
31
+ 'the app index.html has been removed',
32
+ );
33
+ expect(
34
+ existsSync(join(project.dir(), 'index.html')),
35
+ 'the root index.html has been added',
36
+ );
37
+ });
38
+
39
+ it('successfully lints', async function () {
40
+ let result = await project.execa('pnpm', ['lint']);
41
+
42
+ console.log(result.stdout);
43
+ });
44
+
45
+ it('successfully builds', async function () {
46
+ let result = await project.execa('pnpm', ['build']);
47
+
48
+ console.log(result.stdout);
49
+ });
50
+
51
+ it('successfully runs tests', async function () {
52
+ let result;
53
+
54
+ try {
55
+ result = await project.execa('pnpm', ['test:ember']);
56
+ } catch (err) {
57
+ console.log(err.stdout, err.stderr);
58
+ throw 'Failed to successfully run test:ember';
59
+ }
60
+
61
+ // make sure that each of the tests that we expect actually show up
62
+ // alternatively we can change this to search for `pass 3`
63
+ expect(result.stdout).to.contain(
64
+ 'Acceptance | welcome page: visiting /index shows the welcome page',
65
+ );
66
+ expect(result.stdout).to.contain(
67
+ 'Acceptance | styles: visiting /styles',
68
+ );
69
+
70
+ console.log(result.stdout);
71
+ });
72
+
73
+ it('successfully runs tests in dev mode', async function () {
74
+ await project.$`pnpm install --save-dev testem http-proxy`;
75
+ let appURL;
76
+
77
+ let server;
78
+
79
+ try {
80
+ server = project.execa('pnpm', ['start']);
81
+
82
+ await new Promise((resolve) => {
83
+ server.stdout.on('data', (line) => {
84
+ let result = /Local:\s+(https?:\/\/.*)\//g.exec(
85
+ stripAnsi(line.toString()),
86
+ );
87
+
88
+ if (result) {
89
+ appURL = result[1];
90
+ resolve();
91
+ }
92
+ });
93
+ });
94
+
95
+ writeFileSync(
96
+ join(project.dir(), 'testem-dev.js'),
97
+ `module.exports = {
98
+ test_page: 'tests/index.html?hidepassed',
99
+ disable_watching: true,
100
+ launch_in_ci: ['Chrome'],
101
+ launch_in_dev: ['Chrome'],
102
+ browser_start_timeout: 120,
103
+ browser_args: {
104
+ Chrome: {
105
+ ci: [
106
+ // --no-sandbox is needed when running Chrome inside a container
107
+ process.env.CI ? '--no-sandbox' : null,
108
+ '--headless',
109
+ '--disable-dev-shm-usage',
110
+ '--disable-software-rasterizer',
111
+ '--mute-audio',
112
+ '--remote-debugging-port=0',
113
+ '--window-size=1440,900',
114
+ ].filter(Boolean),
115
+ },
116
+ },
117
+ middleware: [
118
+ require(__dirname + '/testem-proxy.js')('${appURL}')
119
+ ],
120
+ };
121
+ `,
122
+ );
123
+
124
+ let testResult = await project.execa('pnpm', [
125
+ 'testem',
126
+ '--file',
127
+ 'testem-dev.js',
128
+ 'ci',
129
+ ]);
130
+ expect(testResult.exitCode).to.eq(0, testResult.output);
131
+ } finally {
132
+ server?.kill('SIGINT');
133
+ }
134
+ });
135
+
136
+ it('successfully optimizes deps', function () {
137
+ return project.execa('pnpm', ['vite', 'optimize', '--force']);
138
+ });
139
+
140
+ it('can run generators', function () {
141
+ return project.execa('pnpm', ['ember', 'g', 'route', 'fancy']);
142
+ });
143
+ });
144
+ }
145
+ });
@@ -0,0 +1,3 @@
1
+ <div id="custom-component">
2
+ I am a custom component
3
+ </div>
@@ -0,0 +1,6 @@
1
+ export default {
2
+ name: 'test-init',
3
+ initialize(application) {
4
+ application.__test_init = 'coming from the initializer';
5
+ },
6
+ };
@@ -0,0 +1,6 @@
1
+ export default {
2
+ name: 'test-instance-initializers',
3
+ initialize(instance) {
4
+ instance.__instance_test_init = 'set in the instance initializer';
5
+ },
6
+ };
@@ -0,0 +1,12 @@
1
+ import EmberRouter from '@ember/routing/router';
2
+ import config from 'test-app/config/environment';
3
+
4
+ export default class Router extends EmberRouter {
5
+ location = config.locationType;
6
+ rootURL = config.rootURL;
7
+ }
8
+
9
+ Router.map(function () {
10
+ this.route('styles');
11
+ this.route('custom-component');
12
+ });
@@ -0,0 +1,6 @@
1
+ import Route from '@ember/routing/route';
2
+ import { service } from '@ember/service';
3
+
4
+ export default class StylesRoute extends Route {
5
+ @service router;
6
+ }
@@ -0,0 +1,5 @@
1
+ /* Ember supports plain CSS out of the box. More info: https://cli.emberjs.com/release/advanced-use/stylesheets/ */
2
+
3
+ .styles-test {
4
+ background-color: blue;
5
+ }
@@ -0,0 +1,3 @@
1
+ {{page-title "FancyApp"}}
2
+
3
+ {{outlet}}
@@ -0,0 +1 @@
1
+ <CustomComponent />
@@ -0,0 +1 @@
1
+ <WelcomePage />
@@ -0,0 +1,5 @@
1
+ <h1>Styles test</h1>
2
+
3
+ <p class="styles-test">
4
+ I expect to be blue
5
+ </p>
@@ -0,0 +1,35 @@
1
+ const httpProxy = require('http-proxy');
2
+
3
+ /*
4
+ This can be installed as a testem middleware to make testem run against an
5
+ arbitrary real webserver at targetURL.
6
+
7
+ It allows testem to handle the well-known testem-specific paths and proxies
8
+ everything else, while rewriting the testem-added prefix out of your
9
+ "/tests/index.html" URL.
10
+ */
11
+
12
+ module.exports = function testemProxy(targetURL) {
13
+ return function testemProxyHandler(app) {
14
+ const proxy = httpProxy.createProxyServer({
15
+ changeOrigin: true,
16
+ ignorePath: true,
17
+ });
18
+
19
+ proxy.on('error', (err, _req, res) => {
20
+ res && res.status && res.status(500).json(err);
21
+ });
22
+
23
+ app.all('*', (req, res, next) => {
24
+ let url = req.url;
25
+ if (url === '/testem.js' || url.startsWith('/testem/')) {
26
+ return next();
27
+ }
28
+ let m = /^(\/\d+)\/tests\/index.html/.exec(url);
29
+ if (m) {
30
+ url = url.slice(m[1].length);
31
+ }
32
+ proxy.web(req, res, { target: targetURL + url });
33
+ });
34
+ };
35
+ }
@@ -0,0 +1,13 @@
1
+ import { module, test } from 'qunit';
2
+ import { getApplication } from '@ember/test-helpers';
3
+ import { setupApplicationTest } from 'test-app/tests/helpers';
4
+
5
+ module('Acceptance | app route', function (hooks) {
6
+ setupApplicationTest(hooks);
7
+
8
+ test('loaded initializers /', async function (assert) {
9
+ const app = getApplication();
10
+ assert.strictEqual([...app._applicationInstances][0].__instance_test_init, 'set in the instance initializer');
11
+ assert.strictEqual(app.__test_init, 'coming from the initializer');
12
+ });
13
+ });
@@ -0,0 +1,14 @@
1
+ import { module, test } from 'qunit';
2
+ import { visit, currentURL } from '@ember/test-helpers';
3
+ import { setupApplicationTest } from 'test-app/tests/helpers';
4
+
5
+ module('Acceptance | custom-component page', function (hooks) {
6
+ setupApplicationTest(hooks);
7
+
8
+ test('visiting /custom-component', async function (assert) {
9
+ await visit('/custom-component');
10
+
11
+ assert.strictEqual(currentURL(), '/custom-component');
12
+ assert.dom('#custom-component').containsText('I am a custom component');
13
+ });
14
+ })
@@ -0,0 +1,18 @@
1
+ import { module, test } from 'qunit';
2
+ import { visit } from '@ember/test-helpers';
3
+ import { setupApplicationTest } from 'test-app/tests/helpers';
4
+
5
+ module('Acceptance | styles', function (hooks) {
6
+ setupApplicationTest(hooks);
7
+
8
+ test('visiting /styles', async function (assert) {
9
+ await visit('/styles');
10
+
11
+ assert.dom('.styles-test').hasStyle(
12
+ {
13
+ 'background-color': 'rgb(0, 0, 255)',
14
+ },
15
+ 'The background should be blue if the app styles are working correctly',
16
+ );
17
+ });
18
+ });
@@ -0,0 +1,14 @@
1
+ import { module, test } from 'qunit';
2
+ import { visit, currentURL } from '@ember/test-helpers';
3
+ import { setupApplicationTest } from 'test-app/tests/helpers';
4
+
5
+ module('Acceptance | welcome page', function (hooks) {
6
+ setupApplicationTest(hooks);
7
+
8
+ test('visiting /index shows the welcome page', async function (assert) {
9
+ await visit('/');
10
+
11
+ assert.strictEqual(currentURL(), '/');
12
+ assert.dom('h1').containsText('Congratulations, you made it!');
13
+ });
14
+ });
@@ -0,0 +1,10 @@
1
+ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
2
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3
+ import type Application from '@ember/application';
4
+
5
+ export default {
6
+ name: 'test-init',
7
+ initialize(application: Application) {
8
+ (application as any).__test_init = 'coming from the initializer';
9
+ },
10
+ };
@@ -0,0 +1,10 @@
1
+ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
2
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3
+ import type ApplicationInstance from '@ember/application/instance';
4
+
5
+ export default {
6
+ name: 'test-instance-initializers',
7
+ initialize(instance: ApplicationInstance) {
8
+ (instance as any).__instance_test_init = 'set in the instance initializer';
9
+ },
10
+ };
@@ -0,0 +1,12 @@
1
+ import EmberRouter from '@ember/routing/router';
2
+ import config from 'test-app/config/environment';
3
+
4
+ export default class Router extends EmberRouter {
5
+ location = config.locationType;
6
+ rootURL = config.rootURL;
7
+ }
8
+
9
+ Router.map(function () {
10
+ this.route('styles');
11
+ this.route('custom-component');
12
+ });
@@ -0,0 +1,8 @@
1
+ import Route from '@ember/routing/route';
2
+ import { service } from '@ember/service';
3
+
4
+ import type RouterService from '@ember/routing/router-service';
5
+
6
+ export default class StylesRoute extends Route {
7
+ @service declare router: RouterService;
8
+ }
@@ -0,0 +1,5 @@
1
+ /* Ember supports plain CSS out of the box. More info: https://cli.emberjs.com/release/advanced-use/stylesheets/ */
2
+
3
+ .styles-test {
4
+ background-color: blue;
5
+ }
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div id="custom-component">
3
+ I am a custom component
4
+ </div>
5
+ </template>
@@ -0,0 +1,5 @@
1
+ import Custom from './components/custom';
2
+
3
+ <template>
4
+ <Custom />
5
+ </template>
@@ -0,0 +1,5 @@
1
+ import { WelcomePage } from 'ember-welcome-page';
2
+
3
+ <template>
4
+ <WelcomePage />
5
+ </template>
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <h1>Styles test</h1>
3
+
4
+ <p class="styles-test">
5
+ I expect to be blue
6
+ </p>
7
+ </template>
@@ -0,0 +1,36 @@
1
+ /* eslint-disable */
2
+ const httpProxy = require('http-proxy');
3
+
4
+ /*
5
+ This can be installed as a testem middleware to make testem run against an
6
+ arbitrary real webserver at targetURL.
7
+
8
+ It allows testem to handle the well-known testem-specific paths and proxies
9
+ everything else, while rewriting the testem-added prefix out of your
10
+ "/tests/index.html" URL.
11
+ */
12
+
13
+ module.exports = function testemProxy(targetURL) {
14
+ return function testemProxyHandler(app) {
15
+ const proxy = httpProxy.createProxyServer({
16
+ changeOrigin: true,
17
+ ignorePath: true,
18
+ });
19
+
20
+ proxy.on('error', (err, _req, res) => {
21
+ res && res.status && res.status(500).json(err);
22
+ });
23
+
24
+ app.all('*', (req, res, next) => {
25
+ let url = req.url;
26
+ if (url === '/testem.js' || url.startsWith('/testem/')) {
27
+ return next();
28
+ }
29
+ let m = /^(\/\d+)\/tests\/index.html/.exec(url);
30
+ if (m) {
31
+ url = url.slice(m[1].length);
32
+ }
33
+ proxy.web(req, res, { target: targetURL + url });
34
+ });
35
+ };
36
+ };
@@ -0,0 +1,22 @@
1
+ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
2
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3
+ import { module, test } from 'qunit';
4
+ import { getApplication } from '@ember/test-helpers';
5
+ import { assert as debugAssert } from '@ember/debug';
6
+ import { setupApplicationTest } from 'test-app/tests/helpers';
7
+
8
+ module('Acceptance | app route', function (hooks) {
9
+ setupApplicationTest(hooks);
10
+
11
+ test('loaded initializers /', function (assert) {
12
+ const app = getApplication();
13
+
14
+ debugAssert(`App failed to initialize`, app);
15
+
16
+ assert.strictEqual(
17
+ ([...app._applicationInstances][0] as any).__instance_test_init,
18
+ 'set in the instance initializer',
19
+ );
20
+ assert.strictEqual((app as any).__test_init, 'coming from the initializer');
21
+ });
22
+ });
@@ -0,0 +1,14 @@
1
+ import { module, test } from 'qunit';
2
+ import { visit, currentURL } from '@ember/test-helpers';
3
+ import { setupApplicationTest } from 'test-app/tests/helpers';
4
+
5
+ module('Acceptance | custom-component page', function (hooks) {
6
+ setupApplicationTest(hooks);
7
+
8
+ test('visiting /custom-component', async function (assert) {
9
+ await visit('/custom-component');
10
+
11
+ assert.strictEqual(currentURL(), '/custom-component');
12
+ assert.dom('#custom-component').containsText('I am a custom component');
13
+ });
14
+ })
@@ -0,0 +1,18 @@
1
+ import { module, test } from 'qunit';
2
+ import { visit } from '@ember/test-helpers';
3
+ import { setupApplicationTest } from 'test-app/tests/helpers';
4
+
5
+ module('Acceptance | styles', function (hooks) {
6
+ setupApplicationTest(hooks);
7
+
8
+ test('visiting /styles', async function (assert) {
9
+ await visit('/styles');
10
+
11
+ assert.dom('.styles-test').hasStyle(
12
+ {
13
+ 'background-color': 'rgb(0, 0, 255)',
14
+ },
15
+ 'The background should be blue if the app styles are working correctly',
16
+ );
17
+ });
18
+ });
@@ -0,0 +1,14 @@
1
+ import { module, test } from 'qunit';
2
+ import { visit, currentURL } from '@ember/test-helpers';
3
+ import { setupApplicationTest } from 'test-app/tests/helpers';
4
+
5
+ module('Acceptance | welcome page', function (hooks) {
6
+ setupApplicationTest(hooks);
7
+
8
+ test('visiting /index shows the welcome page', async function (assert) {
9
+ await visit('/');
10
+
11
+ assert.strictEqual(currentURL(), '/');
12
+ assert.dom('h1').containsText('Congratulations, you made it!');
13
+ });
14
+ });
@@ -0,0 +1,57 @@
1
+ import assert from 'node:assert';
2
+
3
+ import { beforeAll } from 'vitest';
4
+ import { sync as resolveBinSync } from 'resolve-bin';
5
+ import { execa } from 'execa';
6
+ import tmp from 'tmp-promise';
7
+ import { join } from 'path';
8
+ import fixturify from 'fixturify';
9
+
10
+ let localEmberCli = require.resolve('ember-cli/bin/ember');
11
+ const blueprintPath = join(__dirname, '..');
12
+
13
+ function findEmber() {
14
+ return resolveBinSync('ember-cli', { executable: 'ember' });
15
+ }
16
+
17
+ export const emberCli = findEmber();
18
+
19
+ const appName = 'test-app';
20
+
21
+ export function newProjectWithFixtures({
22
+ flags = [],
23
+ fixturePath,
24
+ name = appName,
25
+ } = {}) {
26
+ let dir;
27
+
28
+ assert(fixturePath, `a fixturePath is required`);
29
+
30
+ beforeAll(async () => {
31
+ const tmpDir = (await tmp.dir()).path;
32
+ dir = join(tmpDir, name);
33
+ await execa({cwd: tmpDir})`${localEmberCli} new ${name} -b ${blueprintPath} --skip-git --pnpm ${flags}`;
34
+
35
+ let addonFixture = fixturify.readSync(fixturePath);
36
+ fixturify.writeSync(dir, addonFixture);
37
+
38
+ // Sync the lints for the fixtures with the project's config
39
+ await execa(`pnpm`, ['lint:fix'], {
40
+ cwd: dir,
41
+ });
42
+ });
43
+
44
+
45
+
46
+ return {
47
+ appName: () => name,
48
+ dir: () => dir,
49
+ $: (...args) => execa({ cwd: dir })(...args),
50
+ execa: (program, args, options = {}) => {
51
+ return execa(program, args, {
52
+ cwd: dir,
53
+ ...options,
54
+ });
55
+ },
56
+ };
57
+ }
@@ -0,0 +1,24 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { join } from 'path';
3
+ import { existsSync } from 'fs';
4
+ import { newProjectWithFixtures } from './helpers.mjs';
5
+
6
+ describe('typescript', function () {
7
+ let project = newProjectWithFixtures({
8
+ fixturePath: join(__dirname, 'fixture-ts'),
9
+ flags: ['--typescript'],
10
+ });
11
+
12
+ it('verify files', async function () {
13
+ expect(
14
+ existsSync(join(project.dir(), 'tsconfig.json')),
15
+ 'the root tsconfig.json has been added',
16
+ );
17
+ });
18
+
19
+ it('glint passes', async function () {
20
+ let result = await project.execa('pnpm', ['glint']);
21
+
22
+ console.log(result.stdout);
23
+ });
24
+ });
@@ -0,0 +1,10 @@
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ const ONE_SECOND = 1_000;
4
+
5
+ export default defineConfig({
6
+ test: {
7
+ testTimeout: 100 * ONE_SECOND,
8
+ hookTimeout: 150 * ONE_SECOND,
9
+ },
10
+ });