11import * as fs from 'fs-extra' ;
22import * as path from 'path' ;
3+ import { EOL } from 'os' ;
34import { hook } from 'capture-console' ;
45import ember from 'ember-cli-blueprint-test-helpers/lib/helpers/ember' ;
56import blueprintHelpers from 'ember-cli-blueprint-test-helpers/helpers' ;
67import ts from 'typescript' ;
8+
79const setupTestHooks = blueprintHelpers . setupTestHooks ;
810const emberNew = blueprintHelpers . emberNew ;
911
@@ -28,7 +30,7 @@ describe('Acceptance: ts:precompile command', function () {
2830 let declaration = file ( 'test-file.d.ts' ) ;
2931 expect ( declaration ) . to . exist ;
3032 expect ( declaration . content . trim ( ) ) . to . equal (
31- `export declare const testString: string;\n //# sourceMappingURL=test-file.d.ts.map`
33+ `export declare const testString: string;${ EOL } //# sourceMappingURL=test-file.d.ts.map`
3234 ) ;
3335 } ) ;
3436
@@ -76,7 +78,7 @@ describe('Acceptance: ts:precompile command', function () {
7678 let declaration = file ( 'src/test-file.d.ts' ) ;
7779 expect ( declaration ) . to . exist ;
7880 expect ( declaration . content . trim ( ) ) . to . equal (
79- `export declare const testString: string;\n //# sourceMappingURL=test-file.d.ts.map`
81+ `export declare const testString: string;${ EOL } //# sourceMappingURL=test-file.d.ts.map`
8082 ) ;
8183 } ) ;
8284 } ) ;
@@ -100,7 +102,7 @@ describe('Acceptance: ts:precompile command', function () {
100102 let declaration = file ( 'test-file.d.ts' ) ;
101103 expect ( declaration ) . to . exist ;
102104 expect ( declaration . content . trim ( ) ) . to . equal (
103- `export declare const testString: string;\n //# sourceMappingURL=test-file.d.ts.map`
105+ `export declare const testString: string;${ EOL } //# sourceMappingURL=test-file.d.ts.map`
104106 ) ;
105107 } ) ;
106108 } ) ;
@@ -128,7 +130,7 @@ describe('Acceptance: ts:precompile command', function () {
128130 const declaration = file ( 'test-support/test-file.d.ts' ) ;
129131 expect ( declaration ) . to . exist ;
130132 expect ( declaration . content . trim ( ) ) . to . equal (
131- `export declare const testString: string;\n //# sourceMappingURL=test-file.d.ts.map`
133+ `export declare const testString: string;${ EOL } //# sourceMappingURL=test-file.d.ts.map`
132134 ) ;
133135 } ) ;
134136 } ) ;
@@ -164,13 +166,13 @@ describe('Acceptance: ts:precompile command', function () {
164166 const componentDecl = file ( 'components/my-component.d.ts' ) ;
165167 expect ( componentDecl ) . to . exist ;
166168 expect ( componentDecl . content . trim ( ) ) . to . equal (
167- `export declare const testString: string;\n //# sourceMappingURL=my-component.d.ts.map`
169+ `export declare const testString: string;${ EOL } //# sourceMappingURL=my-component.d.ts.map`
168170 ) ;
169171
170172 const testSupportDecl = file ( 'test-support/test-file.d.ts' ) ;
171173 expect ( testSupportDecl ) . to . exist ;
172174 expect ( testSupportDecl . content . trim ( ) ) . to . equal (
173- `export declare const anotherTestString: string;\n //# sourceMappingURL=test-file.d.ts.map`
175+ `export declare const anotherTestString: string;${ EOL } //# sourceMappingURL=test-file.d.ts.map`
174176 ) ;
175177 } ) ;
176178 } ) ;
0 commit comments