Skip to content

Commit 53173e5

Browse files
committed
Remove unneeded tests
1 parent 7f06d55 commit 53173e5

18 files changed

+164
-8106
lines changed

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ unicode-id = { version = "0.3", features = ["no_std"] }
2626
env_logger = "0.9"
2727
criterion = "0.4"
2828
pretty_assertions = "1"
29-
swc_ecma_codegen = "0.127"
30-
swc_common = "0.29"
31-
swc_ecma_ast = "0.94"
32-
swc_ecma_parser = "0.122"
33-
swc_ecma_transforms_react = "0.155"
34-
swc_ecma_visit = "0.80"
29+
swc_core = { version = "0.43.30", features = [
30+
"ecma_ast",
31+
"ecma_visit",
32+
"ecma_parser",
33+
"common",
34+
] }
3535

3636
[build-dependencies]
3737
regex = "1"

tests/mdx_expression_flow.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ fn mdx_expression_flow_gnostic() -> Result<(), String> {
176176

177177
assert_eq!(
178178
to_html_with_options("{b { c }", &swc).err().unwrap(),
179-
"1:4: Could not parse expression with swc: Unexpected content after expression",
179+
"1:9: Could not parse expression with swc: Unexpected content after expression",
180180
"should crash if no closing brace is found (2)"
181181
);
182182

@@ -239,7 +239,7 @@ fn mdx_expression_spread() -> Result<(), String> {
239239

240240
assert_eq!(
241241
to_html_with_options("<a {b} />", &swc).err().unwrap(),
242-
"1:5: Expected a single spread value, such as `...x`",
242+
"1:5: Unexpected prop in spread (such as `{x}`): only a spread is supported (such as `{...x}`)",
243243
"should crash if not a spread"
244244
);
245245

@@ -251,13 +251,13 @@ fn mdx_expression_spread() -> Result<(), String> {
251251

252252
assert_eq!(
253253
to_html_with_options("<a {...b,c} d>", &swc).err().unwrap(),
254-
"1:5: Expected a single spread value, such as `...x`",
254+
"1:5: Unexpected extra content in spread (such as `{...x,y}`): only a single spread is supported (such as `{...x}`)",
255255
"should crash if a spread and other things"
256256
);
257257

258258
assert_eq!(
259259
to_html_with_options("<a {} />", &swc).err().unwrap(),
260-
"1:5: Expected a single spread value, such as `...x`",
260+
"1:9: Unexpected prop in spread (such as `{x}`): only a spread is supported (such as `{...x}`)",
261261
"should crash on an empty spread"
262262
);
263263

@@ -269,7 +269,7 @@ fn mdx_expression_spread() -> Result<(), String> {
269269

270270
assert_eq!(
271271
to_html_with_options("<a {/* b */} />", &swc).err().unwrap(),
272-
"1:5: Expected a single spread value, such as `...x`",
272+
"1:5: Unexpected prop in spread (such as `{x}`): only a spread is supported (such as `{...x}`)",
273273
"should crash on a comment spread"
274274
);
275275

tests/mdx_expression_text.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ fn mdx_expression_text_gnostic_core() -> Result<(), String> {
138138
to_html_with_options("> a {\n> b\n> c} d", &swc)
139139
.err()
140140
.unwrap(),
141-
"3:3: Could not parse expression with swc: Unexpected content after expression",
141+
"3:7: Could not parse expression with swc: Unexpected content after expression",
142142
"should crash on incorrect expressions in containers (2)"
143143
);
144144

@@ -263,7 +263,7 @@ fn mdx_expression_text_gnostic() -> Result<(), String> {
263263

264264
assert_eq!(
265265
to_html_with_options("a {b { c } d", &swc).err().unwrap(),
266-
"1:6: Could not parse expression with swc: Unexpected content after expression",
266+
"1:13: Could not parse expression with swc: Unexpected content after expression",
267267
"should crash if no closing brace is found (2)"
268268
);
269269

tests/mdx_jsx_text.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ fn mdx_jsx_text_gnostic() -> Result<(), String> {
608608
to_html_with_options("a <b{c=d}={}/> f", &swc)
609609
.err()
610610
.unwrap(),
611-
"1:6: Expected a single spread value, such as `...x`",
611+
"1:6: Unexpected prop in spread (such as `{x}`): only a spread is supported (such as `{...x}`)",
612612
"should crash on invalid JS in an attribute expression (2)"
613613
);
614614

0 commit comments

Comments
 (0)