@@ -9,73 +9,91 @@ import { generateApp } from './helpers.mjs';
99 */
1010describe ( 'Blueprint Arguments' , function ( ) {
1111 describe ( '--typescript' , async function ( ) {
12- it ( 'does not generate a tsconfig if you do not pass --typescript' , async function ( ) {
12+ it ( 'does not generate a tsconfig if you do not pass --typescript' , async function ( ) {
1313 const { files } = await generateApp ( ) ;
14- expect ( files [ 'tsconfig.json' ] ) . to . be . undefined ;
1514
15+ expect ( files [ 'tsconfig.json' ] ) . to . be . undefined ;
1616 expect ( Object . keys ( files . app . templates ) ) . toMatchInlineSnapshot ( `
1717 [
1818 "application.gjs",
1919 ]
20- ` )
21- } )
20+ ` ) ;
21+ } ) ;
2222
23- it ( 'generates an app with --typescript' , async function ( ) {
24- const { files } = await generateApp ( { flags : [ '--typescript' ] } ) ;
23+ it ( 'generates an app with --typescript' , async function ( ) {
24+ const { files } = await generateApp ( { flags : [ '--typescript' ] } ) ;
2525
26- expect ( parse ( files [ 'tsconfig.json' ] ) . extends ) . to . equal ( "@ember/app-tsconfig" )
26+ expect ( parse ( files [ 'tsconfig.json' ] ) . extends ) . to . equal (
27+ '@ember/app-tsconfig' ,
28+ ) ;
29+ expect ( parse ( files [ 'package.json' ] ) . scripts [ 'lint:types' ] ) . to . not . be
30+ . undefined ;
2731 expect ( Object . keys ( files . app . templates ) ) . toMatchInlineSnapshot ( `
2832 [
2933 "application.gts",
3034 ]
31- ` )
32- } )
35+ ` ) ;
36+ } ) ;
3337 } ) ;
3438
3539 describe ( '--package-manager' , async function ( ) {
3640 it ( 'works with npm by default' , async function ( ) {
3741 const { files } = await generateApp ( ) ;
3842
39- expect ( parse ( files [ 'package.json' ] ) . scripts . lint ) . toMatchInlineSnapshot ( `"concurrently "npm:lint:*(!fix)" --names "lint:" --prefixColors auto"` )
43+ expect ( parse ( files [ 'package.json' ] ) . scripts . lint ) . toMatchInlineSnapshot (
44+ `"concurrently "npm:lint:*(!fix)" --names "lint:" --prefixColors auto"` ,
45+ ) ;
4046 } ) ;
4147
4248 it ( 'works with --package-manager=pnpm' , async function ( ) {
43- const { files } = await generateApp ( { flags : [ '--package-manager=pnpm' ] } ) ;
49+ const { files } = await generateApp ( {
50+ flags : [ '--package-manager=pnpm' ] ,
51+ } ) ;
4452
45- expect ( parse ( files [ 'package.json' ] ) . scripts . lint ) . toMatchInlineSnapshot ( `"concurrently "pnpm:lint:*(!fix)" --names "lint:" --prefixColors auto"` )
53+ expect ( parse ( files [ 'package.json' ] ) . scripts . lint ) . toMatchInlineSnapshot (
54+ `"concurrently "pnpm:lint:*(!fix)" --names "lint:" --prefixColors auto"` ,
55+ ) ;
4656 } ) ;
4757
4858 it ( 'works with --pnpm in the same way as --package-manager=pnpm' , async function ( ) {
49- const { files } = await generateApp ( { flags : [ '--pnpm' ] } ) ;
59+ const { files } = await generateApp ( { flags : [ '--pnpm' ] } ) ;
5060
51- expect ( parse ( files [ 'package.json' ] ) . scripts . lint ) . toMatchInlineSnapshot ( `"concurrently "pnpm:lint:*(!fix)" --names "lint:" --prefixColors auto"` )
61+ expect ( parse ( files [ 'package.json' ] ) . scripts . lint ) . toMatchInlineSnapshot (
62+ `"concurrently "pnpm:lint:*(!fix)" --names "lint:" --prefixColors auto"` ,
63+ ) ;
5264 } ) ;
5365
54- it ( 'works with --package-manager=yarn' , async function ( ) {
55- const { files } = await generateApp ( { flags : [ '--package-manager=yarn' ] } ) ;
66+ it ( 'works with --package-manager=yarn' , async function ( ) {
67+ const { files } = await generateApp ( {
68+ flags : [ '--package-manager=yarn' ] ,
69+ } ) ;
5670
57- expect ( parse ( files [ 'package.json' ] ) . scripts . lint ) . toMatchInlineSnapshot ( `"concurrently "yarn:lint:*(!fix)" --names "lint:" --prefixColors auto"` )
71+ expect ( parse ( files [ 'package.json' ] ) . scripts . lint ) . toMatchInlineSnapshot (
72+ `"concurrently "yarn:lint:*(!fix)" --names "lint:" --prefixColors auto"` ,
73+ ) ;
5874 } ) ;
5975
60- it ( 'works with --yarn in the same way as --package-manager=yarn' , async function ( ) {
61- const { files } = await generateApp ( { flags : [ '--yarn' ] } ) ;
76+ it ( 'works with --yarn in the same way as --package-manager=yarn' , async function ( ) {
77+ const { files } = await generateApp ( { flags : [ '--yarn' ] } ) ;
6278
63- expect ( parse ( files [ 'package.json' ] ) . scripts . lint ) . toMatchInlineSnapshot ( `"concurrently "yarn:lint:*(!fix)" --names "lint:" --prefixColors auto"` )
79+ expect ( parse ( files [ 'package.json' ] ) . scripts . lint ) . toMatchInlineSnapshot (
80+ `"concurrently "yarn:lint:*(!fix)" --names "lint:" --prefixColors auto"` ,
81+ ) ;
6482 } ) ;
6583 } ) ;
6684
6785 describe ( '--ci-provider' , async function ( ) {
68- it ( 'uses github by default' , async function ( ) {
86+ it ( 'uses github by default' , async function ( ) {
6987 const { files } = await generateApp ( ) ;
7088
7189 expect ( files [ '.github' ] . workflows [ 'ci.yml' ] ) . to . not . be . undefined ;
7290 } ) ;
7391
74- it ( 'does not generate any workflow files if --ci-provider=none is passed' , async function ( ) {
92+ it ( 'does not generate any workflow files if --ci-provider=none is passed' , async function ( ) {
7593 const { files } = await generateApp ( { flags : [ '--ci-provider=none' ] } ) ;
7694
7795 expect ( files [ '.github' ] ) . to . be . undefined ;
78- } )
96+ } ) ;
7997 } ) ;
8098
8199 describe ( '--lang' , async function ( ) {
@@ -87,22 +105,27 @@ describe('Blueprint Arguments', function () {
87105 } ) ;
88106
89107 describe ( '--no-ember-data' , async function ( ) {
90- it ( 'installs ember-data by default' , async function ( ) {
108+ it ( 'installs ember-data by default' , async function ( ) {
91109 const { files } = await generateApp ( ) ;
92110
93- expect ( parse ( files [ 'package.json' ] ) . devDependencies [ 'ember-data' ] ) . to . not . be . undefined ;
94- } )
111+ expect ( parse ( files [ 'package.json' ] ) . devDependencies [ 'ember-data' ] ) . to . not
112+ . be . undefined ;
113+ } ) ;
95114
96- it ( 'does not add ember-data if you pass --no-ember-data' , async function ( ) {
97- const { files } = await generateApp ( { flags : [ '--no-ember-data' ] } ) ;
115+ it ( 'does not add ember-data if you pass --no-ember-data' , async function ( ) {
116+ const { files } = await generateApp ( { flags : [ '--no-ember-data' ] } ) ;
98117
99- expect ( parse ( files [ 'package.json' ] ) . devDependencies [ 'ember-data' ] ) . to . be . undefined ;
100- } )
118+ expect ( parse ( files [ 'package.json' ] ) . devDependencies [ 'ember-data' ] ) . to . be
119+ . undefined ;
120+ } ) ;
101121 } ) ;
102122
103123 describe ( '--name' , async function ( ) {
104124 it ( 'generates an app with a specified name' , async function ( ) {
105- const { files } = await generateApp ( { name : 'foo' , flags : [ '--name=foo' ] } ) ;
125+ const { files } = await generateApp ( {
126+ name : 'foo' ,
127+ flags : [ '--name=foo' ] ,
128+ } ) ;
106129
107130 expect ( parse ( files [ 'package.json' ] ) . name ) . toBe ( 'foo' ) ;
108131 } ) ;
@@ -112,15 +135,21 @@ describe('Blueprint Arguments', function () {
112135 it ( 'generates an app with the welcome page component by default' , async function ( ) {
113136 const { files } = await generateApp ( ) ;
114137
115- expect ( parse ( files [ 'package.json' ] ) . devDependencies [ 'ember-welcome-page' ] ) . to . not . be . undefined ;
116- expect ( files . app . templates [ 'application.gjs' ] ) . to . contain ( '<WelcomePage />' ) ;
138+ expect ( parse ( files [ 'package.json' ] ) . devDependencies [ 'ember-welcome-page' ] )
139+ . to . not . be . undefined ;
140+ expect ( files . app . templates [ 'application.gjs' ] ) . to . contain (
141+ '<WelcomePage />' ,
142+ ) ;
117143 } ) ;
118144
119145 it ( 'generates an app without the welcome page component' , async function ( ) {
120146 const { files } = await generateApp ( { flags : [ '--no-welcome' ] } ) ;
121147
122- expect ( parse ( files [ 'package.json' ] ) . devDependencies [ 'ember-welcome-page' ] ) . to . be . undefined ;
123- expect ( files . app . templates [ 'application.gjs' ] ) . not . to . contain ( '<WelcomePage />' ) ;
148+ expect ( parse ( files [ 'package.json' ] ) . devDependencies [ 'ember-welcome-page' ] )
149+ . to . be . undefined ;
150+ expect ( files . app . templates [ 'application.gjs' ] ) . not . to . contain (
151+ '<WelcomePage />' ,
152+ ) ;
124153 } ) ;
125154 } ) ;
126- } )
155+ } ) ;
0 commit comments