0.1.0 • Published 5 years ago

@trademachines/jasmine-matchers v0.1.0

Weekly downloads
6
License
MIT
Repository
-
Last release
5 years ago

@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"
    ]
  }
}
0.1.0

5 years ago