@@ -20,31 +20,31 @@ describe('Acceptance: ts:precompile command', function() {
2020
2121 it ( 'generates .js and .d.ts files from the addon tree' , function ( ) {
2222 fs . ensureDirSync ( 'addon' ) ;
23- fs . writeFileSync ( 'addon/test-file.ts' , `export const testString: string = 'hello';\n ` ) ;
23+ fs . writeFileSync ( 'addon/test-file.ts' , `export const testString: string = 'hello';` ) ;
2424
2525 return ember ( [ 'ts:precompile' ] )
2626 . then ( ( ) => {
2727 let declaration = file ( 'test-file.d.ts' ) ;
2828 expect ( declaration ) . to . exist ;
29- expect ( declaration . content ) . to . equal ( `export declare const testString: string;\n ` ) ;
29+ expect ( declaration . content . trim ( ) ) . to . equal ( `export declare const testString: string;` ) ;
3030
3131 let transpiled = file ( 'addon/test-file.js' ) ;
3232 expect ( transpiled ) . to . exist ;
33- expect ( transpiled . content ) . to . equal ( `export const testString = 'hello';\n ` ) ;
33+ expect ( transpiled . content . trim ( ) ) . to . equal ( `export const testString = 'hello';` ) ;
3434 } ) ;
3535 } ) ;
3636
3737 it ( 'generates .js files only from the app tree' , function ( ) {
3838 fs . ensureDirSync ( 'app' ) ;
39- fs . writeFileSync ( 'app/test-file.ts' , `export const testString: string = 'hello';\n ` ) ;
39+ fs . writeFileSync ( 'app/test-file.ts' , `export const testString: string = 'hello';` ) ;
4040
4141 return ember ( [ 'ts:precompile' ] ) . then ( ( ) => {
4242 let declaration = file ( 'test-file.d.ts' ) ;
4343 expect ( declaration ) . not . to . exist ;
4444
4545 let transpiled = file ( 'app/test-file.js' ) ;
4646 expect ( transpiled ) . to . exist ;
47- expect ( transpiled . content . split ( '\n' ) [ 0 ] ) . to . equal ( `export const testString = 'hello';` ) ;
47+ expect ( transpiled . content . trim ( ) ) . to . equal ( `export const testString = 'hello';` ) ;
4848 } ) ;
4949 } ) ;
5050} ) ;
0 commit comments