1
1
import * as fs from 'fs-extra' ;
2
2
import * as path from 'path' ;
3
+ import { EOL } from 'os' ;
3
4
import { hook } from 'capture-console' ;
4
5
import ember from 'ember-cli-blueprint-test-helpers/lib/helpers/ember' ;
5
6
import blueprintHelpers from 'ember-cli-blueprint-test-helpers/helpers' ;
6
7
import ts from 'typescript' ;
8
+
7
9
const setupTestHooks = blueprintHelpers . setupTestHooks ;
8
10
const emberNew = blueprintHelpers . emberNew ;
9
11
@@ -28,7 +30,7 @@ describe('Acceptance: ts:precompile command', function () {
28
30
let declaration = file ( 'test-file.d.ts' ) ;
29
31
expect ( declaration ) . to . exist ;
30
32
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`
32
34
) ;
33
35
} ) ;
34
36
@@ -76,7 +78,7 @@ describe('Acceptance: ts:precompile command', function () {
76
78
let declaration = file ( 'src/test-file.d.ts' ) ;
77
79
expect ( declaration ) . to . exist ;
78
80
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`
80
82
) ;
81
83
} ) ;
82
84
} ) ;
@@ -100,7 +102,7 @@ describe('Acceptance: ts:precompile command', function () {
100
102
let declaration = file ( 'test-file.d.ts' ) ;
101
103
expect ( declaration ) . to . exist ;
102
104
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`
104
106
) ;
105
107
} ) ;
106
108
} ) ;
@@ -128,7 +130,7 @@ describe('Acceptance: ts:precompile command', function () {
128
130
const declaration = file ( 'test-support/test-file.d.ts' ) ;
129
131
expect ( declaration ) . to . exist ;
130
132
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`
132
134
) ;
133
135
} ) ;
134
136
} ) ;
@@ -164,13 +166,13 @@ describe('Acceptance: ts:precompile command', function () {
164
166
const componentDecl = file ( 'components/my-component.d.ts' ) ;
165
167
expect ( componentDecl ) . to . exist ;
166
168
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`
168
170
) ;
169
171
170
172
const testSupportDecl = file ( 'test-support/test-file.d.ts' ) ;
171
173
expect ( testSupportDecl ) . to . exist ;
172
174
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`
174
176
) ;
175
177
} ) ;
176
178
} ) ;
0 commit comments