199 lines
4.8 KiB
Plaintext
199 lines
4.8 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`destructuring.js [espree] format 1`] = `
|
|
"Unexpected character '#' (1:16)
|
|
> 1 | const [a, b] = #[1, 2];
|
|
| ^
|
|
2 | assert(a === 1);
|
|
3 | assert(b === 2);
|
|
4 | "
|
|
`;
|
|
|
|
exports[`destructuring.js [meriyah] format 1`] = `
|
|
"[1:16]: '#' not followed by identifier (1:16)
|
|
> 1 | const [a, b] = #[1, 2];
|
|
| ^
|
|
2 | assert(a === 1);
|
|
3 | assert(b === 2);
|
|
4 | "
|
|
`;
|
|
|
|
exports[`destructuring.js format 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["babel"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
const [a, b] = #[1, 2];
|
|
assert(a === 1);
|
|
assert(b === 2);
|
|
|
|
const [a, ...rest] = #[1, 2, 3];
|
|
assert(a === 1);
|
|
assert(Array.isArray(rest));
|
|
assert(rest[0] === 2);
|
|
assert(rest[1] === 3);
|
|
|
|
=====================================output=====================================
|
|
const [a, b] = #[1, 2];
|
|
assert(a === 1);
|
|
assert(b === 2);
|
|
|
|
const [a, ...rest] = #[1, 2, 3];
|
|
assert(a === 1);
|
|
assert(Array.isArray(rest));
|
|
assert(rest[0] === 2);
|
|
assert(rest[1] === 3);
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`invalid-tuple-holes.js [babel] format 1`] = `
|
|
"Unexpected token ',' (1:4)
|
|
> 1 | #[,]
|
|
| ^
|
|
2 | "
|
|
`;
|
|
|
|
exports[`invalid-tuple-holes.js [espree] format 1`] = `
|
|
"Unexpected character '#' (1:1)
|
|
> 1 | #[,]
|
|
| ^
|
|
2 | "
|
|
`;
|
|
|
|
exports[`invalid-tuple-holes.js [meriyah] format 1`] = `
|
|
"[1:1]: '#' not followed by identifier (1:1)
|
|
> 1 | #[,]
|
|
| ^
|
|
2 | "
|
|
`;
|
|
|
|
exports[`syntax.js [espree] format 1`] = `
|
|
"Unexpected character '#' (1:1)
|
|
> 1 | #[]
|
|
| ^
|
|
2 | #[1, 2]
|
|
3 | #[1, 2, #{ a: 3 }]
|
|
4 | "
|
|
`;
|
|
|
|
exports[`syntax.js [meriyah] format 1`] = `
|
|
"[1:1]: '#' not followed by identifier (1:1)
|
|
> 1 | #[]
|
|
| ^
|
|
2 | #[1, 2]
|
|
3 | #[1, 2, #{ a: 3 }]
|
|
4 | "
|
|
`;
|
|
|
|
exports[`syntax.js format 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["babel"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
#[]
|
|
#[1, 2]
|
|
#[1, 2, #{ a: 3 }]
|
|
|
|
=====================================output=====================================
|
|
#[];
|
|
#[1, 2];
|
|
#[1, 2, #{ a: 3 }];
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`tuple.js [espree] format 1`] = `
|
|
"Unexpected character '#' (1:16)
|
|
> 1 | const tuple1 = #[1, 2, 3];
|
|
| ^
|
|
2 |
|
|
3 | assert(tuple1[0] === 1);
|
|
4 | "
|
|
`;
|
|
|
|
exports[`tuple.js [meriyah] format 1`] = `
|
|
"[1:16]: '#' not followed by identifier (1:16)
|
|
> 1 | const tuple1 = #[1, 2, 3];
|
|
| ^
|
|
2 |
|
|
3 | assert(tuple1[0] === 1);
|
|
4 | "
|
|
`;
|
|
|
|
exports[`tuple.js format 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["babel"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
const tuple1 = #[1, 2, 3];
|
|
|
|
assert(tuple1[0] === 1);
|
|
|
|
const tuple2 = tuple1.with(0, 2);
|
|
assert(tuple1 !== tuple2);
|
|
assert(tuple2 === #[2, 2, 3]);
|
|
|
|
const tuple3 = #[1, ...tuple2];
|
|
assert(tuple3 === #[1, 2, 2, 3]);
|
|
|
|
const tuple4 = tuple3.pushed(4);
|
|
assert(tuple4 === #[1, 2, 2, 3, 4]);
|
|
|
|
assert(tuple4.first() === 1);
|
|
const tuple5 = tuple4.popped();
|
|
assert(tuple5 === #[2, 2, 3, 4]);
|
|
|
|
=====================================output=====================================
|
|
const tuple1 = #[1, 2, 3];
|
|
|
|
assert(tuple1[0] === 1);
|
|
|
|
const tuple2 = tuple1.with(0, 2);
|
|
assert(tuple1 !== tuple2);
|
|
assert(tuple2 === #[2, 2, 3]);
|
|
|
|
const tuple3 = #[1, ...tuple2];
|
|
assert(tuple3 === #[1, 2, 2, 3]);
|
|
|
|
const tuple4 = tuple3.pushed(4);
|
|
assert(tuple4 === #[1, 2, 2, 3, 4]);
|
|
|
|
assert(tuple4.first() === 1);
|
|
const tuple5 = tuple4.popped();
|
|
assert(tuple5 === #[2, 2, 3, 4]);
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`tuple-trailing-comma.js [espree] format 1`] = `
|
|
"Unexpected character '#' (1:1)
|
|
> 1 | #[1,]
|
|
| ^
|
|
2 | "
|
|
`;
|
|
|
|
exports[`tuple-trailing-comma.js [meriyah] format 1`] = `
|
|
"[1:1]: '#' not followed by identifier (1:1)
|
|
> 1 | #[1,]
|
|
| ^
|
|
2 | "
|
|
`;
|
|
|
|
exports[`tuple-trailing-comma.js format 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["babel"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
#[1,]
|
|
|
|
=====================================output=====================================
|
|
#[1];
|
|
|
|
================================================================================
|
|
`;
|