The actual snapshot is saved in error-message.js.snap
.
Generated by AVA.
Snapshot 1
`␊
Error 1/1:␊
> 1 | throw new Error()␊
| ^^^^^^^^^^^ Pass a message to the `Error` constructor.␊
`
Snapshot 1
`␊
Error 1/1:␊
> 1 | throw Error()␊
| ^^^^^^^ Pass a message to the `Error` constructor.␊
`
Snapshot 1
`␊
Error 1/1:␊
> 1 | throw new Error('')␊
| ^^ Error message should not be an empty string.␊
`
Snapshot 1
`␊
Error 1/1:␊
> 1 | throw new Error(``)␊
| ^^ Error message should not be an empty string.␊
`
Snapshot 1
`␊
Error 1/1:␊
> 1 | const err = new Error();␊
| ^^^^^^^^^^^ Pass a message to the `Error` constructor.␊
2 | throw err;␊
`
Snapshot 1
`␊
Error 1/1:␊
1 | let err = 1;␊
> 2 | err = new Error();␊
| ^^^^^^^^^^^ Pass a message to the `Error` constructor.␊
3 | throw err;␊
`
Snapshot 1
`␊
Error 1/1:␊
> 1 | let err = new Error();␊
| ^^^^^^^^^^^ Pass a message to the `Error` constructor.␊
2 | err = 1;␊
3 | throw err;␊
`
Snapshot 1
`␊
Error 1/1:␊
> 1 | const foo = new TypeError()␊
| ^^^^^^^^^^^^^^^ Pass a message to the `TypeError` constructor.␊
`
Snapshot 1
`␊
Error 1/1:␊
> 1 | const foo = new SyntaxError()␊
| ^^^^^^^^^^^^^^^^^ Pass a message to the `SyntaxError` constructor.␊
`
Snapshot 1
`␊
Error 1/1:␊
1 | const errorMessage = Object.freeze({errorMessage: 1}).errorMessage;␊
> 2 | throw new Error(errorMessage)␊
| ^^^^^^^^^^^^ Error message should be a string.␊
`
Snapshot 1
`␊
Error 1/1:␊
> 1 | throw new Error([])␊
| ^^ Error message should be a string.␊
`
Snapshot 1
`␊
Error 1/1:␊
> 1 | throw new Error([foo])␊
| ^^^^^ Error message should be a string.␊
`
Snapshot 1
`␊
Error 1/1:␊
> 1 | throw new Error([0][0])␊
| ^^^^^^ Error message should be a string.␊
`
Snapshot 1
`␊
Error 1/1:␊
> 1 | throw new Error({})␊
| ^^ Error message should be a string.␊
`
Snapshot 1
`␊
Error 1/1:␊
> 1 | throw new Error({foo})␊
| ^^^^^ Error message should be a string.␊
`
Snapshot 1
`␊
Error 1/1:␊
> 1 | throw new Error({foo: 0}.foo)␊
| ^^^^^^^^^^^^ Error message should be a string.␊
`
Snapshot 1
`␊
Error 1/1:␊
> 1 | throw new Error(lineNumber=2)␊
| ^^^^^^^^^^^^ Error message should be a string.␊
`
Snapshot 1
`␊
Error 1/1:␊
> 1 | const error = new RangeError;␊
| ^^^^^^^^^^^^^^ Pass a message to the `RangeError` constructor.␊
`