Skip to content

Commit a9e3fff

Browse files
committed
Account for Windows' ridiculous carriage return
1 parent 4b914f8 commit a9e3fff

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

ts/tests/commands/precompile-test.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import * as fs from 'fs-extra';
22
import * as path from 'path';
3+
import { EOL } from 'os';
34
import { hook } from 'capture-console';
45
import ember from 'ember-cli-blueprint-test-helpers/lib/helpers/ember';
56
import blueprintHelpers from 'ember-cli-blueprint-test-helpers/helpers';
67
import ts from 'typescript';
8+
79
const setupTestHooks = blueprintHelpers.setupTestHooks;
810
const 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

Comments
 (0)