Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Apr 4, 2024
1 parent 4911864 commit d6de3b6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
Expand Up @@ -48,7 +48,7 @@ printWidth: 80
exports[`invalid-duplicate-using-bindings.js [acorn] format 1`] = `
"Unexpected token (2:9)
1 | {
> 2 | using f, f = foo();
> 2 | using f = foo(), f = foo();
| ^
3 | }
4 | {
Expand All @@ -59,7 +59,7 @@ Cause: Unexpected token (2:8)"
exports[`invalid-duplicate-using-bindings.js [espree] format 1`] = `
"Unexpected token f (2:9)
1 | {
> 2 | using f, f = foo();
> 2 | using f = foo(), f = foo();
| ^
3 | }
4 | {
Expand All @@ -70,7 +70,7 @@ Cause: Unexpected token f"
exports[`invalid-duplicate-using-bindings.js [flow] format 1`] = `
"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:9)
1 | {
> 2 | using f, f = foo();
> 2 | using f = foo(), f = foo();
| ^
3 | }
4 | {
Expand All @@ -80,33 +80,22 @@ exports[`invalid-duplicate-using-bindings.js [flow] format 1`] = `
exports[`invalid-duplicate-using-bindings.js [meriyah] format 1`] = `
"Unexpected token: 'identifier' (2:9)
1 | {
> 2 | using f, f = foo();
> 2 | using f = foo(), f = foo();
| ^
3 | }
4 | {
5 | using g = foo();
Cause: [2:9]: Unexpected token: 'identifier'"
`;
exports[`invalid-duplicate-using-bindings.js [typescript] format 1`] = `
"'using' declarations must be initialized. (2:9)
1 | {
> 2 | using f, f = foo();
| ^
3 | }
4 | {
5 | using g = foo();
Cause: 'using' declarations must be initialized."
`;
exports[`invalid-duplicate-using-bindings.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
{
using f, f = foo();
using f = foo(), f = foo();
}
{
using g = foo();
Expand All @@ -115,7 +104,7 @@ printWidth: 80
=====================================output=====================================
{
using f,
using f = foo(),
f = foo();
}
{
Expand Down
@@ -1,5 +1,5 @@
{
using f, f = foo();
using f = foo(), f = foo();
}
{
using g = foo();
Expand Down
2 changes: 0 additions & 2 deletions tests/format/js/explicit-resource-management/jsfmt.spec.js
Expand Up @@ -25,8 +25,6 @@ runFormatTest(import.meta, ["babel", "flow", "typescript"], {
"valid-module-block-top-level-await-using-binding.js",
],
typescript: [
"invalid-duplicate-using-bindings.js",

// https://github.com/typescript-eslint/typescript-eslint/blob/4f34d0ba34474926ba1eed623704b583a037f886/packages/typescript-estree/src/convert.ts#L1035-L1050
"valid-for-using-declaration.js",
"valid-await-using-comments.js",
Expand Down

0 comments on commit d6de3b6

Please sign in to comment.