Skip to content

pitzcarraldo/cafeteria

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cafeteria

npm version npm downloads

Dumb wrapper of chai, sinon and friends.

Install

$ npm install --save-dev mocha cafeteria

Dependencies

Usage

import { expect } from 'cafeteria';

const foo = () => 'bar';
const foos = ['bar'];

describe('foo', function () {
  it('should returns bar.', function () {
    expect(foo()).equal('bar');
  })
});

describe('foos', function () {
  it('should not be empty.', function () {
    expect(foos).not.to.be.empty(); // already applied dirty-chai
  })
});

API

  • cafeteria.chai: Same with chai.
  • cafeteria.assert: Same with chai's.
  • cafeteria.expect: Same with chai's.
  • cafeteria.should: Same with chai's. Should run as function. e.g. should().
  • cafeteria.sinon: Same with sinon.
  • cafeteria.sandbox: Same with sinon's.
  • cafeteria.spy: Same with sinon's.
  • cafeteria.stub: Same with sinon's.
  • cafeteria.mock: Same with sinon's.

Useful links

About

Dumb wrapper of chai, sinon and friends.

Resources

Stars

Watchers

Forks