mirror of
https://github.com/bobwen-dev/react-templates
synced 2025-04-12 00:56:39 +02:00
fixed tests on windows
This commit is contained in:
parent
dbcd1f2cbe
commit
268ac0a419
@ -38,6 +38,11 @@ test('invalid tests', function (t) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function normalizeError(err) {
|
||||||
|
err.msg = err.msg.replace(/\r/g,'');
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
test('invalid tests json', function (t) {
|
test('invalid tests json', function (t) {
|
||||||
var cli = require('../../src/cli');
|
var cli = require('../../src/cli');
|
||||||
var context = require('../../src/context');
|
var context = require('../../src/context');
|
||||||
@ -57,7 +62,7 @@ test('invalid tests json', function (t) {
|
|||||||
var filename = path.join(dataPath, testFile.file);
|
var filename = path.join(dataPath, testFile.file);
|
||||||
var options = {format: 'json'};
|
var options = {format: 'json'};
|
||||||
cli.handleSingleFile(options, filename);
|
cli.handleSingleFile(options, filename);
|
||||||
t.deepEqual(context.getMessages()[0], errorEqualMessage(testFile.issue, filename), 'Expect cli to produce valid output messages');
|
t.deepEqual(normalizeError(context.getMessages()[0]), errorEqualMessage(testFile.issue, filename), 'Expect cli to produce valid output messages');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user