Test JSX artifact rendering path
This commit is contained in:
@@ -881,4 +881,14 @@ mod tests {
|
||||
assert!(page.contains("react@18/umd/react.production.min.js"));
|
||||
assert!(page.contains("@babel/standalone/babel.min.js"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn artifact_viewer_page_includes_react_runtime_for_jsx() {
|
||||
let page = build_artifact_viewer_page("demo.jsx", "turn-3", "file-3", "");
|
||||
|
||||
assert!(page.contains("const renderMode = \"react\";"));
|
||||
assert!(page.contains("renderReactArtifact(el, text);"));
|
||||
assert!(page.contains("react@18/umd/react.production.min.js"));
|
||||
assert!(page.contains("@babel/standalone/babel.min.js"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user