Skip to content

Commit

Permalink
Generate new snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Dec 23, 2020
1 parent 1b4897e commit c8fbe55
Show file tree
Hide file tree
Showing 32 changed files with 1,596 additions and 0 deletions.
101 changes: 101 additions & 0 deletions test/snapshots/consistent-function-scoping.js.md
@@ -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 added test/snapshots/consistent-function-scoping.js.snap
Binary file not shown.
33 changes: 33 additions & 0 deletions test/snapshots/empty-brace-spaces.js.md
@@ -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 added test/snapshots/empty-brace-spaces.js.snap
Binary file not shown.
191 changes: 191 additions & 0 deletions test/snapshots/error-message.js.md
@@ -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 added test/snapshots/error-message.js.snap
Binary file not shown.

0 comments on commit c8fbe55

Please sign in to comment.