@trademachines/jasmine-matchers
v0.1.0
Published
Helping us to bootstrap typescript apps fast
Readme
@trademachines/jasmine-matchers
Introduction | Matchers | Integration
Introduction
This library provide a set of matchers for Jasmine to make life easier and code more readable 👍
Matchers
Following matchers are added for joi:
expect(...).toBeJoiError();
expect(...).toBeJoiErrorWith({ path: '', type: '' });Following matchers are added for monet.js:
expect(...).toBeEither();
expect(...).toBeLeftEither();
expect(...).toBeLeftEitherWith('something');
expect(...).toBeMaybe();
expect(...).toBeNone();
expect(...).toBeRightEither();
expect(...).toBeRightEitherWith('something');
expect(...).toBeSome();
expect(...).toBeSomeWith();Integration
Node.js and TypeScript
To be ready for use just add require('@trademachines/jasmine-matchers'); to your Jasmine bootstrap file.
Also, don't forget to add them to your list of types in tsconfig.json like so:
{
"compilerOptions": {
"types": [
"node",
"jasmine",
"@trademachines/jasmine-matchers"
]
}
}