Skip to content

Unit test the JavaScript code with Mocha

Jim00000 edited this page Apr 17, 2021 · 1 revision

Introduction

Install required libraries with npm

  • esm@3.2.25
  • chai@4.3.4
  • mocha@8.3.2
$ npm install -g esm@3.2.25 chai@4.3.4 mocha@8.3.2

and use mocha to do unittest (in the same directory with .mocharc.js)

$ mocha

Clone this wiki locally