DEV Community

Cover image for Tasty Testing with Mocha and Chai ☕️

Tasty Testing with Mocha and Chai ☕️

Devin Golden on November 27, 2018

Today I'm going to briefly introduce a simple workflow for automating testing that uses Mocha and Chai. Mocha is a test framework that sets up test...
Collapse
 
manuelbarzi profile image
manuelbarzi

you should NOT install mocha and chai as a DEPENDENCY, BUT as a DEV-DEPENDECY.

$ npm i -D mocha chai

testing tools are dependencies for development, not for delivery.

Collapse
 
basedenergy profile image
Devin Golden

Thanks for the heads up! I'll update the post and take that into account for the future

Collapse
 
ben profile image
Ben Halpern

I think I need a coffee now

Collapse
 
david_j_eddy profile image
David J Eddy

You speaking 'testing' === you receive new follower. :)

Collapse
 
stuartpullinger profile image
stuartpullinger

Thanks! Is that dependencies file 'package.json'?

Collapse
 
lffg profile image
Luiz Felipe Gonçalves

Yup