@@ -14,7 +14,8 @@ describe('Acceptance: ember-cli-typescript generator', function() {
1414 it ( 'basic app' , function ( ) {
1515 const args = [ 'ember-cli-typescript' ] ;
1616
17- return helpers . emberNew ( )
17+ return helpers
18+ . emberNew ( )
1819 . then ( ( ) => helpers . emberGenerate ( args ) )
1920 . then ( ( ) => {
2021 const pkg = file ( 'package.json' ) ;
@@ -31,16 +32,24 @@ describe('Acceptance: ember-cli-typescript generator', function() {
3132 expect ( tsconfigJson . compilerOptions . paths ) . to . deep . equal ( {
3233 'my-app/tests/*' : [ 'tests/*' ] ,
3334 'my-app/*' : [ 'app/*' ] ,
35+ '*' : [ 'types/*' ] ,
3436 } ) ;
3537
3638 expect ( tsconfigJson . include ) . to . deep . equal ( [ 'app' , 'tests' ] ) ;
39+
40+ const projectTypes = file ( 'types/my-app/index.d.ts' ) ;
41+ expect ( projectTypes ) . to . exist ;
42+
43+ const environmentTypes = file ( 'types/my-app/config/environment.d.ts' ) ;
44+ expect ( environmentTypes ) . to . exist ;
3745 } ) ;
3846 } ) ;
3947
4048 it ( 'basic addon' , function ( ) {
4149 const args = [ 'ember-cli-typescript' ] ;
4250
43- return helpers . emberNew ( { target : 'addon' } )
51+ return helpers
52+ . emberNew ( { target : 'addon' } )
4453 . then ( ( ) => helpers . emberGenerate ( args ) )
4554 . then ( ( ) => {
4655 const pkg = file ( 'package.json' ) ;
@@ -59,6 +68,7 @@ describe('Acceptance: ember-cli-typescript generator', function() {
5968 'dummy/*' : [ 'tests/dummy/app/*' ] ,
6069 'my-addon' : [ 'addon' ] ,
6170 'my-addon/*' : [ 'addon/*' ] ,
71+ '*' : [ 'types/*' ] ,
6272 } ) ;
6373
6474 expect ( tsconfigJson . include ) . to . deep . equal ( [ 'addon' , 'tests' ] ) ;
@@ -68,7 +78,8 @@ describe('Acceptance: ember-cli-typescript generator', function() {
6878 it ( 'in-repo addons' , function ( ) {
6979 const args = [ 'ember-cli-typescript' ] ;
7080
71- return helpers . emberNew ( )
81+ return helpers
82+ . emberNew ( )
7283 . then ( ( ) => {
7384 const packagePath = path . resolve ( process . cwd ( ) , 'package.json' ) ;
7485 const contents = JSON . parse ( fs . readFileSync ( packagePath , { encoding : 'utf8' } ) ) ;
@@ -90,6 +101,7 @@ describe('Acceptance: ember-cli-typescript generator', function() {
90101 'my-addon-1/*' : [ 'lib/my-addon-1/addon/*' ] ,
91102 'my-addon-2' : [ 'lib/my-addon-2/addon' ] ,
92103 'my-addon-2/*' : [ 'lib/my-addon-2/addon/*' ] ,
104+ '*' : [ 'types/*' ] ,
93105 } ) ;
94106
95107 expect ( json . include ) . to . deep . equal ( [ 'app' , 'tests' , 'lib/my-addon-1' , 'lib/my-addon-2' ] ) ;
0 commit comments