Skip to content

Commit 25a72c8

Browse files
committed
test real file system
1 parent 404b6a3 commit 25a72c8

18 files changed

+67
-126
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: CI
22
on:
33
push:
4-
branches:
5-
- main
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
68
jobs:
79
build:
810
name: test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2+
tmp
23
.vscode

test/bun/convert-jest-to-bun.spec.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ describe(snippet, () => {
1212
`;
1313

1414
assertConvert({
15-
path: "test/foobar.spec.js",
15+
path: "test/bun/convert-jest-to-bun.spec.js",
1616
input,
1717
output,
1818
snippet,
19-
helpers: ["helpers/add-import"],
2019
});
2120
});
2221

@@ -39,11 +38,10 @@ describe(snippet, () => {
3938
`;
4039

4140
assertConvert({
42-
path: "test/foobar.spec.js",
41+
path: "test/bun/convert-jest-to-bun.spec.js",
4342
input,
4443
output,
4544
snippet,
46-
helpers: ["helpers/add-import"],
4745
});
4846
});
4947

@@ -66,11 +64,10 @@ describe(snippet, () => {
6664
`;
6765

6866
assertConvert({
69-
path: "test/foobar.spec.js",
67+
path: "test/bun/convert-jest-to-bun.spec.js",
7068
input,
7169
output,
7270
snippet,
73-
helpers: ["helpers/add-import"],
7471
});
7572
});
7673
});

test/javascript/no-unused-imports.spec.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ describe(snippet, () => {
1717
const c = a() + b + x() + y();
1818
`,
1919
snippet,
20-
helpers: ["helpers/remove-imports"],
2120
});
2221
});
2322

@@ -36,7 +35,6 @@ describe(snippet, () => {
3635
const c = b(x, y);
3736
`,
3837
snippet,
39-
helpers: ["helpers/remove-imports"],
4038
});
4139
});
4240

@@ -59,7 +57,6 @@ describe(snippet, () => {
5957
const c = a(y);
6058
`,
6159
snippet,
62-
helpers: ["helpers/remove-imports"],
6360
});
6461
});
6562

@@ -77,7 +74,6 @@ describe(snippet, () => {
7774
console.log(y);
7875
`,
7976
snippet,
80-
helpers: ["helpers/remove-imports"],
8177
});
8278
});
8379

@@ -92,7 +88,6 @@ describe(snippet, () => {
9288
console.log(c);
9389
`,
9490
snippet,
95-
helpers: ["helpers/remove-imports"],
9691
});
9792
});
9893

@@ -108,7 +103,6 @@ describe(snippet, () => {
108103
const c = a() + b;
109104
`,
110105
snippet,
111-
helpers: ["helpers/remove-imports"],
112106
});
113107
});
114108

@@ -123,7 +117,6 @@ describe(snippet, () => {
123117
const c = a() + b;
124118
`,
125119
snippet,
126-
helpers: ["helpers/remove-imports"],
127120
});
128121
});
129122

@@ -138,7 +131,6 @@ describe(snippet, () => {
138131
p.test();
139132
`,
140133
snippet,
141-
helpers: ["helpers/remove-imports"],
142134
});
143135
});
144136

@@ -152,7 +144,6 @@ describe(snippet, () => {
152144
console.log("p");
153145
`,
154146
snippet,
155-
helpers: ["helpers/remove-imports"],
156147
});
157148
});
158149

@@ -167,7 +158,6 @@ describe(snippet, () => {
167158
console.log(y);
168159
`,
169160
snippet,
170-
helpers: ["helpers/remove-imports"],
171161
});
172162
});
173163

@@ -194,8 +184,7 @@ describe(snippet, () => {
194184
}
195185
`,
196186
snippet,
197-
helpers: ["helpers/remove-imports"],
198-
path: "code.jsx",
187+
path: "javascript/no-unused-imports.jsx",
199188
});
200189
});
201190
});

test/javascript/no-useless-constructor.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,5 @@ describe(snippet, () => {
3636
input,
3737
output,
3838
snippet,
39-
path: "code.js",
4039
});
4140
});

test/javascript/prefer-class-properties.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ describe(snippet, () => {
6565
input,
6666
output,
6767
snippet,
68-
path: "code.jsx",
68+
path: "javascript/prefer-class-properties.jsx",
6969
});
7070
});
7171

@@ -99,7 +99,7 @@ describe(snippet, () => {
9999
input,
100100
output,
101101
snippet,
102-
path: "code.jsx",
102+
path: "javascript/prefer-class-properties.jsx",
103103
});
104104
});
105105
});

test/react/add-autocomplete-attribute.spec.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ describe(snippet, () => {
1717
input,
1818
output,
1919
snippet,
20-
path: "code.jsx",
2120
});
2221
});
2322

@@ -38,7 +37,6 @@ describe(snippet, () => {
3837
input,
3938
output,
4039
snippet,
41-
path: "code.jsx",
4240
});
4341
});
4442

@@ -71,7 +69,6 @@ describe(snippet, () => {
7169
input,
7270
output,
7371
snippet,
74-
path: "code.jsx",
7572
});
7673
});
7774
});

test/react/import-named-component.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe(snippet, () => {
2121
input,
2222
output,
2323
snippet,
24-
path: "code.jsx",
24+
path: "react/import-named-component.jsx",
2525
});
2626
});
2727

@@ -44,7 +44,7 @@ describe(snippet, () => {
4444
input,
4545
output,
4646
snippet,
47-
path: "code.jsx",
47+
path: "react/import-named-component.jsx",
4848
});
4949
});
5050
});

test/react/import-prop-types.spec.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ describe(snippet, () => {
1616
input,
1717
output,
1818
snippet,
19-
path: "code.jsx",
20-
helpers: ["helpers/add-import", "helpers/remove-imports"],
2119
});
2220
});
2321

@@ -35,8 +33,6 @@ describe(snippet, () => {
3533
input,
3634
output,
3735
snippet,
38-
path: "code.jsx",
39-
helpers: ["helpers/add-import", "helpers/remove-imports"],
4036
});
4137
});
4238
});

test/react/prefer-class-properties.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,5 @@ describe(snippet, () => {
6969
input,
7070
output,
7171
snippet,
72-
subSnippets: ["javascript/no-useless-constructor"],
73-
path: "code.jsx",
7472
});
7573
});

0 commit comments

Comments
 (0)