@@ -18,7 +18,7 @@ describe('Acceptance: ts:precompile command', function() {
1818 return emberNew ( { target : 'addon' } ) . then ( ( ) => ember ( [ 'generate' , 'ember-cli-typescript' ] ) ) ;
1919 } ) ;
2020
21- it ( 'generates .js and . d.ts files from the addon tree' , function ( ) {
21+ it ( 'generates .d.ts files from the addon tree' , function ( ) {
2222 fs . ensureDirSync ( 'addon' ) ;
2323 fs . writeFileSync ( 'addon/test-file.ts' , `export const testString: string = 'hello';` ) ;
2424
@@ -27,29 +27,21 @@ describe('Acceptance: ts:precompile command', function() {
2727 let declaration = file ( 'test-file.d.ts' ) ;
2828 expect ( declaration ) . to . exist ;
2929 expect ( declaration . content . trim ( ) ) . to . equal ( `export declare const testString: string;` ) ;
30-
31- let transpiled = file ( 'addon/test-file.js' ) ;
32- expect ( transpiled ) . to . exist ;
33- expect ( transpiled . content . trim ( ) ) . to . equal ( `export const testString = 'hello';` ) ;
3430 } ) ;
3531 } ) ;
3632
37- it ( 'generates .js files only from the app tree' , function ( ) {
33+ it ( 'generates nothing from the app tree' , function ( ) {
3834 fs . ensureDirSync ( 'app' ) ;
3935 fs . writeFileSync ( 'app/test-file.ts' , `export const testString: string = 'hello';` ) ;
4036
4137 return ember ( [ 'ts:precompile' ] ) . then ( ( ) => {
4238 let declaration = file ( 'test-file.d.ts' ) ;
4339 expect ( declaration ) . not . to . exist ;
44-
45- let transpiled = file ( 'app/test-file.js' ) ;
46- expect ( transpiled ) . to . exist ;
47- expect ( transpiled . content . trim ( ) ) . to . equal ( `export const testString = 'hello';` ) ;
4840 } ) ;
4941 } ) ;
5042
5143 describe ( 'module unification' , function ( ) {
52- it ( 'generates .js and . d.ts files from the src tree' , function ( ) {
44+ it ( 'generates .d.ts files from the src tree' , function ( ) {
5345 fs . ensureDirSync ( 'src' ) ;
5446 fs . writeFileSync ( 'src/test-file.ts' , `export const testString: string = 'hello';` ) ;
5547
@@ -62,10 +54,6 @@ describe('Acceptance: ts:precompile command', function() {
6254 let declaration = file ( 'src/test-file.d.ts' ) ;
6355 expect ( declaration ) . to . exist ;
6456 expect ( declaration . content . trim ( ) ) . to . equal ( `export declare const testString: string;` ) ;
65-
66- let transpiled = file ( 'src/test-file.js' ) ;
67- expect ( transpiled ) . to . exist ;
68- expect ( transpiled . content . trim ( ) ) . to . equal ( `export const testString = 'hello';` ) ;
6957 } ) ;
7058 } ) ;
7159 } ) ;
0 commit comments