Skip to content
Demonstrate TypeScript + mocha strictNullChecks not playing well together.
TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.gitignore
LICENSE.md
README.md
package-lock.json
package.json
tsconfig.json

README.md

Demonstrate strictNullChecks with mocha.

mkdir typescript-mocha
cd typescript-mocha
tsc --init
npm init
mkdir src
mkdir test
# create src/spline.ts and test/spline.spec.ts
npm install mocha @types/mocha --save-dev
npm install chai @types/chai --save-dev
npm install ts-node --save-dev
add `./node_modules/.bin/mocha -r ts-node/register test/**/*.spec.ts` to package.json's test command
npm run test
You can’t perform that action at this time.