TSArch
![Travis](https://travis-ci.org/mrpatpat/ts-arch.svg?branch=master)
An architecture unit test framework for Typescript
Usage
npm install --save-dev tsarch
import {TSArch} from 'tsarch'
import 'tsarch/jest/ArchMatchers'
describe('Architecture', () => {
it('defines that all files in dog folder should be called ...Dog.ts', async () => {
const project = await TSArch.parseTypescriptProject('./src')
const rule = TSArch.defineThat()
.files()
.withPathMatching(/.*dog.*/)
.should()
.matchName(/.+.Dog\.ts($|\n)/)
expect(project).toMatchArchRule(rule)
})
})
NPM scripts
npm t
: Run test suitenpm start
: Run npm run build
in watch modenpm run test:watch
: Run test suite in interactive watch modenpm run test:prod
: Run linting and generate coveragenpm run build
: Generate bundles and typings, create docsnpm run lint
: Lints codenpm run commit
: Commit using conventional commit style (husky will tell you to use it if you haven't :wink:)
Resources
Credits
Typescript Library Starter
Made with :heart: by @alexjoverm and all these wonderful contributors (emoji key):
This project follows the all-contributors specification. Contributions of any kind are welcome!