Skip to content

Commit

Permalink
refactor: tidy up tests
Browse files Browse the repository at this point in the history
In fact, it was a task that should have been done in #26, but there were a lot of tests so I pretended not to know and passed it on at the time.
  • Loading branch information
ony3000 committed Mar 2, 2024
1 parent b884eb8 commit 194f8f6
Show file tree
Hide file tree
Showing 72 changed files with 134 additions and 17,812 deletions.
174 changes: 1 addition & 173 deletions tests/v2-test/babel/assignment/1tbs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,84 +37,6 @@ const fixtures: Fixture[] = [
},
{
name: 'object assignment (3)',
input: `const foo = /*comment1*/ {
bar: {
baz: 'baz'
}
}`,
output: `const foo = /*comment1*/ {
bar: {
baz: "baz",
},
};
`,
},
{
name: 'object assignment (4)',
input: `const foo =
/*comment2*/
{
bar: {
baz: 'baz'
}
}`,
output: `const foo =
/*comment2*/
{
bar: {
baz: "baz",
},
};
`,
},
{
name: 'object assignment (5)',
input: `const foo = {
/*comment3*/ bar: {
baz: 'baz'
}
}`,
output: `const foo = {
/*comment3*/ bar: {
baz: "baz",
},
};
`,
},
{
name: 'object assignment (6)',
input: `const foo = {
bar: /*comment4*/ {
baz: 'baz'
}
}`,
output: `const foo = {
bar: /*comment4*/ {
baz: "baz",
},
};
`,
},
{
name: 'object assignment (7)',
input: `const foo = {
bar:
/*comment5*/
{
baz: 'baz'
}
}`,
output: `const foo = {
bar:
/*comment5*/
{
baz: "baz",
},
};
`,
},
{
name: 'object assignment (8)',
input: `const foo = {
bar() {},
['baz']() {}
Expand All @@ -123,57 +45,6 @@ const fixtures: Fixture[] = [
bar() {},
["baz"]() {},
};
`,
},
{
name: 'object assignment (9)',
input: `const foo = {
bar/*comment1*/() {},
['baz']() {}
}`,
output: `const foo = {
bar /*comment1*/() {},
["baz"]() {},
};
`,
},
{
name: 'object assignment (10)',
input: `const foo = {
bar(/*comment2*/) {},
['baz']() {}
}`,
output: `const foo = {
bar(/*comment2*/) {},
["baz"]() {},
};
`,
},
{
name: 'object assignment (11)',
input: `const foo = {
bar()/*comment3*/{},
['baz']() {}
}`,
output: `const foo = {
bar() /*comment3*/ {},
["baz"]() {},
};
`,
},
{
name: 'object assignment (12)',
input: `const foo = {
bar()
/*comment4*/
{},
['baz']() {}
}`,
output: `const foo = {
bar() /*comment4*/
{},
["baz"]() {},
};
`,
},
{
Expand All @@ -188,49 +59,6 @@ const fixtures: Fixture[] = [
},
{
name: 'conditional assignment (2)',
input: `const foo =/*comment1*/true && {
bar: 'baz'
}`,
output: `const foo = /*comment1*/ true && {
bar: "baz",
};
`,
},
{
name: 'conditional assignment (3)',
input: `const foo = true/*comment2*/&& {
bar: 'baz'
}`,
output: `const foo = true /*comment2*/ && {
bar: "baz",
};
`,
},
{
name: 'conditional assignment (4)',
input: `const foo = true &&/*comment3*/{
bar: 'baz'
}`,
output: `const foo = true && /*comment3*/ {
bar: "baz",
};
`,
},
{
name: 'conditional assignment (5)',
input: `const foo = true &&
/*comment4*/
{
bar: 'baz'
}`,
output: `const foo = true && /*comment4*/
{
bar: "baz",
};
`,
},
{
name: 'conditional assignment (6)',
input: `const foo = false || {
bar: 'baz'
}`,
Expand All @@ -240,7 +68,7 @@ const fixtures: Fixture[] = [
`,
},
{
name: 'conditional assignment (7)',
name: 'conditional assignment (3)',
input: `const foo = null ?? {
bar: 'baz'
}`,
Expand Down
Loading

0 comments on commit 194f8f6

Please sign in to comment.