microsoft / TypeScript-Node-Starter

A reference example for TypeScript and Node with a detailed README describing how to use the two together.
MIT License
11.3k stars 2.76k forks source link

removed chai and replaced it totally with jest #287

Open nishat-sayyed opened 4 years ago

nishat-sayyed commented 4 years ago

The chai testing framework is not required as Jest comes bundled with expect and other utility methods.

Following two files were using chai

  1. user.test.ts
  2. contact.test.ts

Also removed chai from package.json and added "include": ["src/**/*", "test/**/*"] in tsconfig.json to support Typescript in the test directory.

All test cases are passing after the change as you can see in the attachment image

msftclas commented 4 years ago

CLA assistant check
All CLA requirements met.

peterblazejewicz commented 4 years ago

Can you, please, revert changes with white-space applied? It looks the semicolons were removed as well, not only unifiying the spaces. See ESLint config:

"semi": ["error", "always"], "quotes": ["error", "double"],

Not sure why it fails on CI, for me it works OK locallly. You could automate fix with package:

npm run lint
nishat-sayyed commented 3 years ago

Thanks @peterblazejewicz I'll try that once I am free.