commit
e2dafb4f28
|
@ -23,9 +23,7 @@
|
||||||
"setupFiles": [
|
"setupFiles": [
|
||||||
"<rootDir>/tests_config/run_spec.js"
|
"<rootDir>/tests_config/run_spec.js"
|
||||||
],
|
],
|
||||||
"testRegex": [
|
"testRegex": "jsfmt\\.spec\\.js$",
|
||||||
"jsfmt\\.spec\\.js$"
|
|
||||||
],
|
|
||||||
"testPathIgnorePatterns": [
|
"testPathIgnorePatterns": [
|
||||||
"tests/new_react",
|
"tests/new_react",
|
||||||
"tests/more_react"
|
"tests/more_react"
|
||||||
|
|
|
@ -23,7 +23,7 @@ function run_spec(dirname) {
|
||||||
const path = dirname + '/' + filename;
|
const path = dirname + '/' + filename;
|
||||||
|
|
||||||
if (!RUN_AST_TESTS) {
|
if (!RUN_AST_TESTS) {
|
||||||
const source = read(path);
|
const source = read(path).replace(/\r\n/g, '\n');
|
||||||
const output = prettyprint(source, path);
|
const output = prettyprint(source, path);
|
||||||
test(filename, () => {
|
test(filename, () => {
|
||||||
expect(source + '~'.repeat(80) + '\n' + output).toMatchSnapshot();
|
expect(source + '~'.repeat(80) + '\n' + output).toMatchSnapshot();
|
||||||
|
|
Loading…
Reference in New Issue