Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't wrap multiline strings with double quotes #4183

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions integration_tests/__tests__/__snapshots__/console.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`console printing 1`] = `
" PASS __tests__/console.test.js
PASS __tests__/console.test.js
● Console

console.log __tests__/console.test.js:11
Expand All @@ -14,20 +14,20 @@ exports[`console printing 1`] = `
This is an error message.


"

`;

exports[`console printing 2`] = `
"Test Suites: 1 passed, 1 total
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Ran all test suites.
"

`;

exports[`console printing with --verbose 1`] = `
" console.log __tests__/console.test.js:11
console.log __tests__/console.test.js:11
This is a log message.

console.info __tests__/console.test.js:13
Expand All @@ -39,37 +39,37 @@ exports[`console printing with --verbose 1`] = `
console.error __tests__/console.test.js:17
This is an error message.

"

`;

exports[`console printing with --verbose 2`] = `
" PASS __tests__/console.test.js
PASS __tests__/console.test.js
✓ works just fine

"

`;

exports[`console printing with --verbose 3`] = `
"Test Suites: 1 passed, 1 total
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Ran all test suites.
"

`;

exports[`does not print to console with --silent 1`] = `""`;

exports[`does not print to console with --silent 2`] = `
" PASS __tests__/console.test.js
PASS __tests__/console.test.js


"
`;

exports[`does not print to console with --silent 3`] = `
"Test Suites: 1 passed, 1 total
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
"

`;
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`prints console.logs when run with forceExit 1`] = `
" PASS __tests__/a-banana.js
PASS __tests__/a-banana.js
✓ banana

"

`;

exports[`prints console.logs when run with forceExit 2`] = `
"Test Suites: 1 passed, 1 total
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Ran all test suites.
"

`;

exports[`prints console.logs when run with forceExit 3`] = `
" console.log __tests__/a-banana.js:2
console.log __tests__/a-banana.js:2
Hey

"

`;
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`collects coverage only from specified files 1`] = `
"----------|----------|----------|----------|----------|----------------|
----------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
All files | 100 | 100 | 100 | 100 | |
setup.js | 100 | 100 | 100 | 100 | |
----------|----------|----------|----------|----------|----------------|
"

`;

exports[`collects coverage only from specified files avoiding dependencies 1`] = `
"----------|----------|----------|----------|----------|----------------|
----------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
All files | 85.71 | 100 | 50 | 85.71 | |
sum.js | 85.71 | 100 | 50 | 85.71 | 13 |
----------|----------|----------|----------|----------|----------------|
"

`;

exports[`json reporter printing with --coverage 1`] = `
"Test Suites: 1 failed, 1 total
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 passed, 2 total
Snapshots: 0 total
Time: <<REPLACED>>
Ran all test suites.
"

`;

exports[`outputs coverage report 1`] = `
"-------------------------------|----------|----------|----------|----------|----------------|
-------------------------------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
-------------------------------|----------|----------|----------|----------|----------------|
All files | 41.18 | 0 | 25 | 41.18 | |
Expand All @@ -39,5 +39,5 @@ All files | 41.18 | 0 | 25 | 41.18 |
sum.js | 85.71 | 100 | 50 | 85.71 | 13 |
sum_dependency.js | 0 | 0 | 0 | 0 | 9,11,12,15 |
-------------------------------|----------|----------|----------|----------|----------------|
"

`;
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`exits with 1 if coverage threshold is not met 1`] = `
"----------------|----------|----------|----------|----------|----------------|
----------------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
----------------|----------|----------|----------|----------|----------------|
All files | 50 | 100 | 0 | 50 | |
not-covered.js | 50 | 100 | 0 | 50 | 3 |
----------------|----------|----------|----------|----------|----------------|
"

`;
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Custom Reporters Integration IncompleteReporter for flexibility 1`] = `
"onRunComplete is called
onRunComplete is called
Passed Tests: 1
Failed Tests: 0
Total Tests: 1
"

`;

exports[`Custom Reporters Integration TestReporter with all tests failing 1`] = `
Expand Down Expand Up @@ -65,20 +65,20 @@ Object {
`;

exports[`Custom Reporters Integration default reporters enabled 1`] = `
" PASS __tests__/add.test.js
PASS __tests__/add.test.js
Custom Reporters
✓ adds ok

"

`;

exports[`Custom Reporters Integration default reporters enabled 2`] = `
"Test Suites: 1 passed, 1 total
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Ran all test suites matching /add.test.js/i.
"

`;

exports[`Custom Reporters Integration default reporters enabled 3`] = `
Expand Down Expand Up @@ -106,7 +106,7 @@ Object {
`;

exports[`Custom Reporters Integration invalid format for adding reporters 1`] = `
"● Reporter Validation Error:
● Reporter Validation Error:

Unexpected value for Path at index 0 of reporter at index 0
Expected:
Expand All @@ -121,31 +121,31 @@ exports[`Custom Reporters Integration invalid format for adding reporters 1`] =
Configuration Documentation:
https://facebook.github.io/jest/docs/configuration.html

"

`;

exports[`Custom Reporters Integration valid array format for adding reporters 1`] = `
"{
\\"onRunComplete\\": {
\\"called\\": true,
\\"numPassedTests\\": 1,
\\"numFailedTests\\": 0,
\\"numTotalTests\\": 1
{
"onRunComplete": {
"called": true,
"numPassedTests": 1,
"numFailedTests": 0,
"numTotalTests": 1
},
\\"onRunStart\\": {
\\"called\\": true,
\\"options\\": \\"object\\"
"onRunStart": {
"called": true,
"options": "object"
},
\\"onTestResult\\": {
\\"times\\": 1,
\\"called\\": true
"onTestResult": {
"times": 1,
"called": true
},
\\"onTestStart\\": {
\\"called\\": true,
\\"path\\": false
"onTestStart": {
"called": true,
"path": false
},
\\"options\\": {
\\"Dmitrii Abramov\\": \\"Awesome\\"
"options": {
"Dmitrii Abramov": "Awesome"
}
}"
Copy link
Collaborator Author

@thymikee thymikee Aug 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💩, it's so much more readable

}
`;
Loading