diff --git a/package.json b/package.json index 3f2485b3..7c7567f5 100644 --- a/package.json +++ b/package.json @@ -23,9 +23,7 @@ "setupFiles": [ "/tests_config/run_spec.js" ], - "testRegex": [ - "jsfmt\\.spec\\.js$" - ], + "testRegex": "jsfmt\\.spec\\.js$", "testPathIgnorePatterns": [ "tests/new_react", "tests/more_react" diff --git a/tests_config/run_spec.js b/tests_config/run_spec.js index 68c9c28f..94b96b65 100644 --- a/tests_config/run_spec.js +++ b/tests_config/run_spec.js @@ -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();