Skip to content

Commit dac41c0

Browse files
committed
fix: undo workaround for color output on windows; test passes now
1 parent d4a5aff commit dac41c0

File tree

1 file changed

+11
-24
lines changed

1 file changed

+11
-24
lines changed

test/index.spec.js

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var windowsIcons = {
5959
var formatError = function (a, b) {
6060
return a + b;
6161
};
62-
function noop() {}
62+
function noop() { }
6363
var baseReporterDecorator = function (context) {
6464
context.renderBrowser = sinon.spy();
6565
context.writeCommonMsg = sinon.spy();
@@ -130,28 +130,15 @@ describe('SpecReporter', function () {
130130
});
131131

132132
it('should set the BaseReporter function\'s colors', function () {
133-
//NOTE: this is temporary as the colors module was updated
134-
if (os.platform() === 'win32') {
135-
newSpecReporter.SPEC_FAILURE.should.equal('%s %s FAILED\n');
136-
newSpecReporter.SPEC_SLOW.should.equal('%s SLOW %s: %s\n');
137-
newSpecReporter.ERROR.should.equal('%s ERROR\n');
138-
newSpecReporter.FINISHED_ERROR.should.equal(' ERROR');
139-
newSpecReporter.FINISHED_SUCCESS.should.equal(' SUCCESS');
140-
newSpecReporter.FINISHED_DISCONNECTED.should.equal(' DISCONNECTED');
141-
newSpecReporter.X_FAILED.should.equal(' (%d FAILED)');
142-
newSpecReporter.TOTAL_SUCCESS.should.equal('TOTAL: %d SUCCESS\n');
143-
newSpecReporter.TOTAL_FAILED.should.equal('TOTAL: %d FAILED, %d SUCCESS\n');
144-
} else {
145-
newSpecReporter.SPEC_FAILURE.should.equal(ansiColors.red + '%s %s FAILED' + ansiColors.reset + '\n');
146-
newSpecReporter.SPEC_SLOW.should.equal(ansiColors.yellow + '%s SLOW %s: %s' + ansiColors.reset + '\n');
147-
newSpecReporter.ERROR.should.equal(ansiColors.red + '%s ERROR' + ansiColors.reset + '\n');
148-
newSpecReporter.FINISHED_ERROR.should.equal(ansiColors.red + ' ERROR' + ansiColors.reset);
149-
newSpecReporter.FINISHED_SUCCESS.should.equal(ansiColors.green + ' SUCCESS' + ansiColors.reset);
150-
newSpecReporter.FINISHED_DISCONNECTED.should.equal(ansiColors.red + ' DISCONNECTED' + ansiColors.reset);
151-
newSpecReporter.X_FAILED.should.equal(ansiColors.red + ' (%d FAILED)' + ansiColors.reset);
152-
newSpecReporter.TOTAL_SUCCESS.should.equal(ansiColors.green + 'TOTAL: %d SUCCESS' + ansiColors.reset + '\n');
153-
newSpecReporter.TOTAL_FAILED.should.equal(ansiColors.red + 'TOTAL: %d FAILED, %d SUCCESS' + ansiColors.reset + '\n');
154-
}
133+
newSpecReporter.SPEC_FAILURE.should.equal(ansiColors.red + '%s %s FAILED' + ansiColors.reset + '\n');
134+
newSpecReporter.SPEC_SLOW.should.equal(ansiColors.yellow + '%s SLOW %s: %s' + ansiColors.reset + '\n');
135+
newSpecReporter.ERROR.should.equal(ansiColors.red + '%s ERROR' + ansiColors.reset + '\n');
136+
newSpecReporter.FINISHED_ERROR.should.equal(ansiColors.red + ' ERROR' + ansiColors.reset);
137+
newSpecReporter.FINISHED_SUCCESS.should.equal(ansiColors.green + ' SUCCESS' + ansiColors.reset);
138+
newSpecReporter.FINISHED_DISCONNECTED.should.equal(ansiColors.red + ' DISCONNECTED' + ansiColors.reset);
139+
newSpecReporter.X_FAILED.should.equal(ansiColors.red + ' (%d FAILED)' + ansiColors.reset);
140+
newSpecReporter.TOTAL_SUCCESS.should.equal(ansiColors.green + 'TOTAL: %d SUCCESS' + ansiColors.reset + '\n');
141+
newSpecReporter.TOTAL_FAILED.should.equal(ansiColors.red + 'TOTAL: %d FAILED, %d SUCCESS' + ansiColors.reset + '\n');
155142
});
156143
});
157144

@@ -376,7 +363,7 @@ describe('SpecReporter', function () {
376363
});
377364
it('should throw an error', function () {
378365
expect(function () {
379-
newSpecReporter.onSpecFailure([],{
366+
newSpecReporter.onSpecFailure([], {
380367
suite: [],
381368
log: []
382369
})

0 commit comments

Comments
 (0)