DEV Community


Discussion on: Why I don't use web components

jcorrivo profile image

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?

  export let a;
  export let b;

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

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