Skip to content

Commit

Permalink
feat: + component update case
Browse files Browse the repository at this point in the history
  • Loading branch information
meloalright committed Feb 27, 2024
1 parent 67ff72c commit c94516f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rustle/tests/component_update/Nested.rustle
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script>
export let q;
</script>

<p>...don't affect this element {q}</p>
9 changes: 9 additions & 0 deletions rustle/tests/component_update/app.rustle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script>
let url = '/tutorial/image.gif';
const update_url = () => url--;

const Nested = require('./Nested.rustle');
</script>

<button on:click={update_url} />
<Nested q={url} />
3 changes: 3 additions & 0 deletions rustle/tests/test_parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ fn test_parsing_nested() { test_parsing("nested".to_owned()) }

#[test]
fn test_tag_update() { test_parsing("tag_update".to_owned()) }

// #[test]
// fn test_component_update() { test_parsing("component_update".to_owned()) }

0 comments on commit c94516f

Please sign in to comment.