Skip to content

Commit

Permalink
test: fix tests by removing unnecessary quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenix-ru committed Nov 27, 2024
1 parent b5e3ee1 commit 163916c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
2 changes: 2 additions & 0 deletions crates/fervid/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
//! let mut transform_errors = Vec::new();
//! let transform_options = fervid_transform::TransformSfcOptions {
//! is_prod: true,
//! is_ce: false,
//! props_destructure: fervid_transform::PropsDestructureConfig::default(),
//! scope_id: "filehash",
//! filename: "input.vue"
//! };
Expand Down
4 changes: 2 additions & 2 deletions crates/fervid_codegen/src/builtins/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ mod tests {
patch_hints: Default::default(),
span: DUMMY_SP,
},
r#"(_openBlock(),_createBlock(_resolveDynamicComponent("div"),null,{"default":_withCtx(()=>[_createTextVNode("foobar")]),_:1}))"#,
r#"(_openBlock(),_createBlock(_resolveDynamicComponent("div"),null,{default:_withCtx(()=>[_createTextVNode("foobar")]),_:1}))"#,
)
}

Expand Down Expand Up @@ -300,7 +300,7 @@ mod tests {
patch_hints: Default::default(),
span: DUMMY_SP,
},
r#"(_openBlock(),_createBlock(_resolveDynamicComponent("div"),{foo:"bar",baz:qux},{named:_withCtx(()=>[_createTextVNode("bazqux")]),"default":_withCtx(()=>[_createTextVNode("foobar")]),_:1}))"#,
r#"(_openBlock(),_createBlock(_resolveDynamicComponent("div"),{foo:"bar",baz:qux},{named:_withCtx(()=>[_createTextVNode("bazqux")]),default:_withCtx(()=>[_createTextVNode("foobar")]),_:1}))"#,
)
}

Expand Down
4 changes: 2 additions & 2 deletions crates/fervid_codegen/src/builtins/suspense.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ mod tests {
patch_hints: Default::default(),
span: DUMMY_SP,
},
r#"(_openBlock(),_createBlock(_Suspense,null,{"default":_withCtx(()=>[_createTextVNode("foobar")]),_:1}))"#,
r#"(_openBlock(),_createBlock(_Suspense,null,{default:_withCtx(()=>[_createTextVNode("foobar")]),_:1}))"#,
)
}

Expand All @@ -123,7 +123,7 @@ mod tests {
patch_hints: Default::default(),
span: DUMMY_SP,
},
r#"(_openBlock(),_createBlock(_Suspense,{foo:"bar",baz:qux},{"default":_withCtx(()=>[_createTextVNode("foobar")]),_:1}))"#,
r#"(_openBlock(),_createBlock(_Suspense,{foo:"bar",baz:qux},{default:_withCtx(()=>[_createTextVNode("foobar")]),_:1}))"#,
)
}

Expand Down
4 changes: 2 additions & 2 deletions crates/fervid_codegen/src/builtins/transition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ mod tests {
patch_hints: Default::default(),
span: DUMMY_SP,
},
r#"_createVNode(_Transition,null,{"default":_withCtx(()=>[_createTextVNode("foobar")]),_:1})"#,
r#"_createVNode(_Transition,null,{default:_withCtx(()=>[_createTextVNode("foobar")]),_:1})"#,
)
}

Expand All @@ -122,7 +122,7 @@ mod tests {
patch_hints: Default::default(),
span: DUMMY_SP,
},
r#"_createVNode(_Transition,{foo:"bar",baz:qux},{"default":_withCtx(()=>[_createTextVNode("foobar")]),_:1})"#,
r#"_createVNode(_Transition,{foo:"bar",baz:qux},{default:_withCtx(()=>[_createTextVNode("foobar")]),_:1})"#,
)
}

Expand Down
4 changes: 2 additions & 2 deletions crates/fervid_codegen/src/builtins/transition_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ mod tests {
patch_hints: Default::default(),
span: DUMMY_SP,
},
r#"_createVNode(_TransitionGroup,null,{"default":_withCtx(()=>[_createTextVNode("foobar")]),_:1})"#,
r#"_createVNode(_TransitionGroup,null,{default:_withCtx(()=>[_createTextVNode("foobar")]),_:1})"#,
)
}

Expand All @@ -122,7 +122,7 @@ mod tests {
patch_hints: Default::default(),
span: DUMMY_SP,
},
r#"_createVNode(_TransitionGroup,{foo:"bar",baz:qux},{"default":_withCtx(()=>[_createTextVNode("foobar")]),_:1})"#,
r#"_createVNode(_TransitionGroup,{foo:"bar",baz:qux},{default:_withCtx(()=>[_createTextVNode("foobar")]),_:1})"#,
)
}

Expand Down
12 changes: 6 additions & 6 deletions crates/fervid_codegen/src/components/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ mod tests {
patch_hints: Default::default(),
span: DUMMY_SP,
},
r#"_createVNode(_component_test_component,null,{"default":_withCtx(()=>[_createTextVNode("hello from component"),_createElementVNode("div",null,"hello from div")])})"#,
r#"_createVNode(_component_test_component,null,{default:_withCtx(()=>[_createTextVNode("hello from component"),_createElementVNode("div",null,"hello from div")])})"#,
false,
);

Expand Down Expand Up @@ -790,7 +790,7 @@ mod tests {
patch_hints: Default::default(),
span: DUMMY_SP,
},
r#"_createVNode(_component_test_component,null,{"default":_withCtx(()=>[_createTextVNode("hello from component"),_createElementVNode("div",null,"hello from div")])})"#,
r#"_createVNode(_component_test_component,null,{default:_withCtx(()=>[_createTextVNode("hello from component"),_createElementVNode("div",null,"hello from div")])})"#,
false,
);
}
Expand Down Expand Up @@ -983,7 +983,7 @@ mod tests {
patch_hints: Default::default(),
span: DUMMY_SP,
},
r#"_createVNode(_component_test_component,null,{"foo-bar":_withCtx(()=>[_createTextVNode("hello from slot")]),"default":_withCtx(()=>[_createTextVNode("hello from component"),_createElementVNode("div",null,"hello from div")])})"#,
r#"_createVNode(_component_test_component,null,{"foo-bar":_withCtx(()=>[_createTextVNode("hello from slot")]),default:_withCtx(()=>[_createTextVNode("hello from component"),_createElementVNode("div",null,"hello from div")])})"#,
false,
);

Expand Down Expand Up @@ -1055,7 +1055,7 @@ mod tests {
patch_hints: Default::default(),
span: DUMMY_SP,
},
r#"_createVNode(_component_test_component,null,{"default":_withCtx(()=>[_createTextVNode("hello from default"),_createElementVNode("div",null,"hello from div")]),"foo-bar":_withCtx(()=>[_createTextVNode("hello from slot")])})"#,
r#"_createVNode(_component_test_component,null,{default:_withCtx(()=>[_createTextVNode("hello from default"),_createElementVNode("div",null,"hello from div")]),"foo-bar":_withCtx(()=>[_createTextVNode("hello from slot")])})"#,
false,
);

Expand Down Expand Up @@ -1108,7 +1108,7 @@ mod tests {
patch_hints: Default::default(),
span: DUMMY_SP,
},
r#"_createVNode(_component_test_component,null,{"foo-bar":_withCtx(()=>[_createTextVNode("hello from slot")]),"default":_withCtx(()=>[_createTextVNode("hello from component"),_createElementVNode("div",null,"hello from div")])})"#,
r#"_createVNode(_component_test_component,null,{"foo-bar":_withCtx(()=>[_createTextVNode("hello from slot")]),default:_withCtx(()=>[_createTextVNode("hello from component"),_createElementVNode("div",null,"hello from div")])})"#,
false,
);
}
Expand Down Expand Up @@ -1202,7 +1202,7 @@ mod tests {
patch_hints: Default::default(),
span: DUMMY_SP,
},
r#"_createVNode(_component_test_component,null,{"foo-bar":_withCtx(()=>[_createTextVNode("hello from slot")]),"default":_withCtx(()=>[_createTextVNode("hello from default"),_createElementVNode("div",null,"hello from div")]),baz:_withCtx(()=>[_createTextVNode("hello from baz")])})"#,
r#"_createVNode(_component_test_component,null,{"foo-bar":_withCtx(()=>[_createTextVNode("hello from slot")]),default:_withCtx(()=>[_createTextVNode("hello from default"),_createElementVNode("div",null,"hello from div")]),baz:_withCtx(()=>[_createTextVNode("hello from baz")])})"#,
false,
);
}
Expand Down

0 comments on commit 163916c

Please sign in to comment.