Unit testing a React component using Jasmine and Webpack

InstructorSimon Bailey

Share this video with your friends

Send Tweet

An introduction on unit testing a ReactJS component using Webpack and Jasmine. Learn how to use Webpack to package and import dependencies plus take advantage of the babel-loader to write a simple Jasmine spec using the latest ES6 syntax.

Kent C. Dodds
~ 9 years ago

FYI, ES6 runs in implicit 'use strict'; mode, so transpilers (like babel) will add 'use strict'; to the output. :-)

Simon Baileyinstructor
~ 9 years ago

Cheers Kent, I've updated the code on Github to reflect this mate, thanks.

dave
~ 9 years ago

Is it possible to do a webpack , jasmine (or Jest) AND a test runner like karma ? This is useful but how would I incorporate tests into a build process , not just run tests ? Hope I make my self clear