Eseguire i test sulla track WebAssembly

Scopri come testare i tuoi esercizi WebAssembly su Exercism


Esegui i test con:

npm run test

Puoi anche eseguire Jest in modalità "watch": rieseguirà i test automaticamente quando salvi le modifiche al codice o al modulo di test:

npm run watch

Capire i test saltati

Il metodo skip indica alla suite di test di non eseguire un test; questa funzione può essere usata anche con gli alias: it.skip(name, fn), xit(name, fn) o xtest(name, fn)

  • Perché vengono saltati?

Per permettere agli utenti di concentrarsi su un test alla volta e di attivare i test uno alla volta man mano che la soluzione prende forma.

  • Come attivarli?

Cambia xtest in test.

test("title cased phrases", () => {
  expect(Acronyms.parse("Portable Network Graphics")).toEqual("PNG");
});