tslint-sinon
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

tslint-sinon

This package provides additional TSLint rules that help to enforce some best practices when using Sinon mocking library.

Supported rules

  • sinon-prefer-resolves - suggests to use stub.resolves(x) instead of stub.returns(Promise.resolve(x)).
  • sinon-prefer-sandbox - suggests to create fakes via sandbox instead of creating them directly.

How to install

  • Run npm install --save-dev tslint-sinon
  • Add to your tslint.json:
  "rules": {
    "sinon-prefer-resolves": true,
    "sinon-prefer-sandbox": true
  },
  "rulesDirectory": [
    "tslint-sinon"
  ]

Status

Build Status

Dependents (0)

Package Sidebar

Install

npm i tslint-sinon

Weekly Downloads

0

Version

1.1.3

License

MIT

Unpacked Size

15 kB

Total Files

12

Last publish

Collaborators

  • litee