Tag:testing

Creating an NPM repo with browser version, and also with testing and linting

This can be done by setting up,

  • Multiple tsconfig.json
  • /browser.ts compiled by Parcel.js to /umd/index.min.js
  • ESLint, with eslint --init
  • Testing, with ts-mocha

So, the project is basically like this,

What is a best way to organize Test Suites / Test Cases in JavaScript?

  • Do you put test cases in JSON / YAML or in separate JavaScript files?
  • What keys do you put for each cases, such as Name, Assertion, Result?
  • Do you print, i.e. console.log / console.dir(..., {depth: null}), results?
  • Do you write "expect to fail" tests?