Skip to content

Commit

Permalink
chore: add test for falsy boolean attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed Oct 21, 2023
1 parent 38289e3 commit 3178595
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/transpiling/jsx_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,17 @@ const $$_tpl_1 = [
];
const a = _jsxssr($$_tpl_1, null);"#,
);

test_transform(
JsxString::default(),
r#"const a = <input type="checkbox" checked={false} />;"#,
r#"import { jsxssr as _jsxssr, jsxattr as _jsxattr } from "react/jsx-runtime";
const $$_tpl_1 = [
'<input type="checkbox" ',
">"
];
const a = _jsxssr($$_tpl_1, _jsxattr("checked", false));"#,
);
}

#[test]
Expand Down

0 comments on commit 3178595

Please sign in to comment.