Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
1,596 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# Snapshot report for `test/consistent-function-scoping.js` | ||
|
||
The actual snapshot is saved in `consistent-function-scoping.js.snap`. | ||
|
||
Generated by [AVA](https://avajs.dev). | ||
|
||
## consistent-function-scoping - #1 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
1 | function foo() {␊ | ||
> 2 | function bar() {}␊ | ||
| ^^^^^^^^^^^^ Move function 'bar' to the outer scope.␊ | ||
3 | }␊ | ||
` | ||
|
||
## consistent-function-scoping - #2 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
1 | function foo() {␊ | ||
> 2 | async function bar() {}␊ | ||
| ^^^^^^^^^^^^^^^^^^ Move async function 'bar' to the outer scope.␊ | ||
3 | }␊ | ||
` | ||
|
||
## consistent-function-scoping - #3 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
1 | function foo() {␊ | ||
> 2 | function * bar() {}␊ | ||
| ^^^^^^^^^^^^^^ Move generator function 'bar' to the outer scope.␊ | ||
3 | }␊ | ||
` | ||
|
||
## consistent-function-scoping - #4 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
1 | function foo() {␊ | ||
> 2 | async function * bar() {}␊ | ||
| ^^^^^^^^^^^^^^^^^^^^ Move async generator function 'bar' to the outer scope.␊ | ||
3 | }␊ | ||
` | ||
|
||
## consistent-function-scoping - #5 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
1 | function foo() {␊ | ||
> 2 | const bar = () => {}␊ | ||
| ^^ Move arrow function 'bar' to the outer scope.␊ | ||
3 | }␊ | ||
` | ||
|
||
## consistent-function-scoping - #6 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | const doFoo = () => bar => bar;␊ | ||
| ^^ Move arrow function to the outer scope.␊ | ||
` | ||
|
||
## consistent-function-scoping - #7 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
1 | function foo() {␊ | ||
> 2 | const bar = async () => {}␊ | ||
| ^^ Move async arrow function 'bar' to the outer scope.␊ | ||
3 | }␊ | ||
` | ||
|
||
## consistent-function-scoping - #8 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
1 | function doFoo() {␊ | ||
> 2 | const doBar = function(bar) {␊ | ||
| ^^^^^^^^ Move function to the outer scope.␊ | ||
3 | return bar;␊ | ||
4 | };␊ | ||
5 | }␊ | ||
` |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Snapshot report for `test/empty-brace-spaces.js` | ||
|
||
The actual snapshot is saved in `empty-brace-spaces.js.snap`. | ||
|
||
Generated by [AVA](https://avajs.dev). | ||
|
||
## empty-brace-spaces - #1 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Input:␊ | ||
1 | try {␊ | ||
2 | foo();␊ | ||
3 | } catch (error) {␊ | ||
4 | ␊ | ||
5 | }␊ | ||
␊ | ||
Output:␊ | ||
1 | try {␊ | ||
2 | foo();␊ | ||
3 | } catch (error) {}␊ | ||
␊ | ||
Error 1/1:␊ | ||
1 | try {␊ | ||
2 | foo();␊ | ||
> 3 | } catch (error) {␊ | ||
| ^␊ | ||
> 4 | ␊ | ||
| ^^^^^^^^␊ | ||
> 5 | }␊ | ||
| ^ Do not add spaces between braces.␊ | ||
` |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
# Snapshot report for `test/error-message.js` | ||
|
||
The actual snapshot is saved in `error-message.js.snap`. | ||
|
||
Generated by [AVA](https://avajs.dev). | ||
|
||
## error-message - #1 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | throw new Error()␊ | ||
| ^^^^^^^^^^^ Pass a message to the `Error` constructor.␊ | ||
` | ||
|
||
## error-message - #2 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | throw Error()␊ | ||
| ^^^^^^^ Pass a message to the `Error` constructor.␊ | ||
` | ||
|
||
## error-message - #3 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | throw new Error('')␊ | ||
| ^^ Error message should not be an empty string.␊ | ||
` | ||
|
||
## error-message - #4 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | throw new Error(``)␊ | ||
| ^^ Error message should not be an empty string.␊ | ||
` | ||
|
||
## error-message - #5 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | const err = new Error();␊ | ||
| ^^^^^^^^^^^ Pass a message to the `Error` constructor.␊ | ||
2 | throw err;␊ | ||
` | ||
|
||
## error-message - #6 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
1 | let err = 1;␊ | ||
> 2 | err = new Error();␊ | ||
| ^^^^^^^^^^^ Pass a message to the `Error` constructor.␊ | ||
3 | throw err;␊ | ||
` | ||
|
||
## error-message - #7 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | let err = new Error();␊ | ||
| ^^^^^^^^^^^ Pass a message to the `Error` constructor.␊ | ||
2 | err = 1;␊ | ||
3 | throw err;␊ | ||
` | ||
|
||
## error-message - #8 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | const foo = new TypeError()␊ | ||
| ^^^^^^^^^^^^^^^ Pass a message to the `TypeError` constructor.␊ | ||
` | ||
|
||
## error-message - #9 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | const foo = new SyntaxError()␊ | ||
| ^^^^^^^^^^^^^^^^^ Pass a message to the `SyntaxError` constructor.␊ | ||
` | ||
|
||
## error-message - #10 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
1 | const errorMessage = Object.freeze({errorMessage: 1}).errorMessage;␊ | ||
> 2 | throw new Error(errorMessage)␊ | ||
| ^^^^^^^^^^^^ Error message should be a string.␊ | ||
` | ||
|
||
## error-message - #11 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | throw new Error([])␊ | ||
| ^^ Error message should be a string.␊ | ||
` | ||
|
||
## error-message - #12 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | throw new Error([foo])␊ | ||
| ^^^^^ Error message should be a string.␊ | ||
` | ||
|
||
## error-message - #13 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | throw new Error([0][0])␊ | ||
| ^^^^^^ Error message should be a string.␊ | ||
` | ||
|
||
## error-message - #14 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | throw new Error({})␊ | ||
| ^^ Error message should be a string.␊ | ||
` | ||
|
||
## error-message - #15 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | throw new Error({foo})␊ | ||
| ^^^^^ Error message should be a string.␊ | ||
` | ||
|
||
## error-message - #16 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | throw new Error({foo: 0}.foo)␊ | ||
| ^^^^^^^^^^^^ Error message should be a string.␊ | ||
` | ||
|
||
## error-message - #17 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | throw new Error(lineNumber=2)␊ | ||
| ^^^^^^^^^^^^ Error message should be a string.␊ | ||
` | ||
|
||
## error-message - #18 | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Error 1/1:␊ | ||
> 1 | const error = new RangeError;␊ | ||
| ^^^^^^^^^^^^^^ Pass a message to the `RangeError` constructor.␊ | ||
` |
Binary file not shown.
Oops, something went wrong.