DEV Community

Discussion on: Why I don't use web components

Collapse
 
jcorrivo profile image
JCorrivo

I'm really surprised that no one has mentionned anything about tests.

I'm really not familiar with Svelte, it's actually the first time I read about it.
I'm curious and I'm wondering how you would write tests to ensure that the result of the add is right?

<script>
  export let a;
  export let b;
</script>

<input type="number" bind:value={a}>
<input type="number" bind:value={b}>

<p>{a} + {b} = {a + b}</p>