Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Test like a boss with TypeScript

paul souche
February 23, 2017

Test like a boss with TypeScript

Paris TypeScript meetup #8 presentation

paul souche

February 23, 2017
Tweet

More Decks by paul souche

Other Decks in Programming

Transcript

  1. Me myself and I - Front end developer @S_A_N_T_E_C_H -

    In love with unit tests since 2013 - In love with TypeScript since 2014 - Paris TypeScript co Organizer @paulsouche / https://github.com/paulsouche / [email protected] #typescriptertalk @S_A_N_T_E_C_H
  2. What are we going to talk about ? How to

    test your assets Back end with mocha / supertest Front end with karma / jasmine Front end with protractor Everything in TypeScript @paulsouche / https://github.com/paulsouche / [email protected] #typescriptertalk @S_A_N_T_E_C_H
  3. What are we not going to talk about ? mocha

    / karma / jasmine … internals @paulsouche / https://github.com/paulsouche / [email protected] #typescriptertalk @S_A_N_T_E_C_H
  4. What are we not going to talk about ? TDD

    / BDD / DDD Unit tests / integration tests / e2e tests @paulsouche / https://github.com/paulsouche / [email protected] #typescriptertalk @S_A_N_T_E_C_H
  5. Backend : Yeah but… What if ? @paulsouche / https://github.com/paulsouche

    / [email protected] I need to stub some methods ? I’ve real repositories ? I’m using HAPI ? Use sinon.js Use proxyquire supertest compatible but other solutions exist #typescriptertalk @S_A_N_T_E_C_H
  6. Frontend : Stack @paulsouche / https://github.com/paulsouche / [email protected] Please insert

    your favourite build engine ... #typescriptertalk @S_A_N_T_E_C_H
  7. Frontend : OK karma what is a preprocessor ? @paulsouche

    / https://github.com/paulsouche / [email protected] #typescriptertalk @S_A_N_T_E_C_H
  8. Frontend : Yeah but… It’s slow right ? @paulsouche /

    https://github.com/paulsouche / [email protected] #typescriptertalk @S_A_N_T_E_C_H
  9. Frontend : Alternatives @paulsouche / https://github.com/paulsouche / [email protected] #typescriptertalk @S_A_N_T_E_C_H

    Make test run in jsdom Faster because no browser Faster because no bundle Hard to polyfill