Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elmarti/simpledetect
https://github.com/elmarti/simpledetect
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/elmarti/simpledetect
- Owner: elmarti
- Created: 2017-12-06T22:07:30.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-06T22:13:36.000Z (about 7 years ago)
- Last Synced: 2024-11-02T20:42:14.978Z (about 2 months ago)
- Language: TypeScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Typescript Mocha Boilerplate
This is just a very basic and simple boilerplate to set up a typescript TDD environment with mocha.The purpose is to have a quick running environment, for example to do some prototyping, learn TDD, Clean Coeds, Patterns or whatsoever with Typescript or actually start a real TypeScript Project.
To use it for your own projects, simply do this:
```
git clone --depth=1 https://github.com/davelosert/typescript-mocha-boilerplate
// Rename the folder to your projects name
mv typescript-mocha-boilerplate
cd $_
// Remove the link to this origin repository
git remote remove origin
// Add your own origin again
git remote add origin https://github.com/path/to/your/target/repository
npm install
```## Tools
The Tools included are:- [ts-node](https://github.com/TypeStrong/ts-node)
- [typescript](https://github.com/Microsoft/TypeScript)
- [mocha](https://mochajs.org/)
- [chai](http://chaijs.com/)
- [sinon](http://sinonjs.org/)
- [sinon-chai](https://github.com/domenic/sinon-chai)## How to run
Simply type `npm run test` and all tests will be run.## Configuration
All Mocha Configuration is handled via the [mocha.opts](./mocha.opts) File, this includes:
- **Compiler-Options:** Tests are ran with *ts-node* directly to skip a compilation phase
- **Test-Filter-Patterns:** All files ending with `spec.ts` will be included in tests
- **Globals and Plugin registration**: plugins (e.g. sinon-chai) can be registered within the [mocha-globals.js](./test/mocha-globals.js) File