Merge pull request #11 from demoneaux/fix-tests

Fix tests for Windows.
master
James Long 2017-01-10 12:07:10 -05:00 committed by GitHub
commit e2dafb4f28
2 changed files with 2 additions and 4 deletions

View File

@ -23,9 +23,7 @@
"setupFiles": [
"<rootDir>/tests_config/run_spec.js"
],
"testRegex": [
"jsfmt\\.spec\\.js$"
],
"testRegex": "jsfmt\\.spec\\.js$",
"testPathIgnorePatterns": [
"tests/new_react",
"tests/more_react"

View File

@ -23,7 +23,7 @@ function run_spec(dirname) {
const path = dirname + '/' + filename;
if (!RUN_AST_TESTS) {
const source = read(path);
const source = read(path).replace(/\r\n/g, '\n');
const output = prettyprint(source, path);
test(filename, () => {
expect(source + '~'.repeat(80) + '\n' + output).toMatchSnapshot();