0.2.43 • Published 7 years ago

taste v0.2.43

Weekly downloads
6
License
MIT
Repository
github
Last release
7 years ago

taste

Simple wrapper around testing libraries used by GetHuman. This library would be helpful to anyone who uses the same testing stack as we do. That includes:

  • Mocha
  • Chai
  • Sinon
  • Karma
  • Protractor
  • Gulp
  • Q
  • JSHint
  • Istanbul

If you don't use all of these, this library won't likely be very helpful for you. If you do, however, then just include this as a dev dependency and it should save you a lot of keystrokes as well as unnecessary cruft in your tests.

Installation

To install simply run the following from the command line in your project root:

npm install taste --save-dev

Then in the Gulpfile.js that should be in your project root (because you are using Gulp, right?), put this near the top:

// in your gulp file or mocha init file (depending on how you run your tests)
var taste = require('taste');
taste.firstBite('../path/to/root/dir');

// in each test spec file
var taste = require('taste');
describe('something to test', function () {
    it('should do something', function () {
        taste.should.exist(blah);
        var fn = taste.spy();
        // etc.
    });
});

## API

The taste object has the following functions that you can use in your test spec:
 
* spy - Exposed sinon.spy
* expect - Exposed chai.expect
* should - Exposed chai.should()
* firstByte - To set the root dir for the app
* all - Does a Q.all() and then calls the mocha done() function once everything has resolved
* eventuallyEqual, eventuallyFulfilled, eventuallyRejected, eventuallyRejectedWith - Extra sugar on top of chai-as-promised
* copy - Copy an object
* target - Do require to get a module to be tested without using relative path (go from project root)
0.2.43

7 years ago

0.2.42

7 years ago

0.2.41

7 years ago

0.2.40

8 years ago

0.2.39

8 years ago

0.2.38

8 years ago

0.2.37

8 years ago

0.2.36

8 years ago

0.2.35

8 years ago

0.2.34

8 years ago

0.2.33

8 years ago

0.2.32

8 years ago

0.2.31

8 years ago

0.2.30

8 years ago

0.2.29

8 years ago

0.2.28

8 years ago

0.2.27

8 years ago

0.2.26

8 years ago

0.2.25

8 years ago

0.2.24

8 years ago

0.2.23

8 years ago

0.2.22

8 years ago

0.2.21

8 years ago

0.2.20

8 years ago

0.2.19

8 years ago

0.2.18

8 years ago

0.2.17

8 years ago

0.2.16

8 years ago

0.2.15

9 years ago

0.2.14

9 years ago

0.2.13

9 years ago

0.2.12

9 years ago

0.2.11

9 years ago

0.2.10

9 years ago

0.2.9

9 years ago

0.2.8

9 years ago

0.2.7

9 years ago

0.2.6

9 years ago

0.2.5

9 years ago

0.2.4

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.71

9 years ago

0.1.70

9 years ago

0.1.69

9 years ago

0.1.68

9 years ago

0.1.67

9 years ago

0.1.66

9 years ago

0.1.65

9 years ago

0.1.64

9 years ago

0.1.63

9 years ago

0.1.62

9 years ago

0.1.61

9 years ago

0.1.60

9 years ago

0.1.59

9 years ago

0.1.58

9 years ago

0.1.57

9 years ago

0.1.56

9 years ago

0.1.55

9 years ago

0.1.54

9 years ago

0.1.53

9 years ago

0.1.52

9 years ago

0.1.51

9 years ago

0.1.50

9 years ago

0.1.49

9 years ago

0.1.48

9 years ago

0.1.47

9 years ago

0.1.46

9 years ago

0.1.45

9 years ago

0.1.44

9 years ago

0.1.43

9 years ago

0.1.42

9 years ago

0.1.41

9 years ago

0.1.40

9 years ago

0.1.29

9 years ago

0.1.28

9 years ago

0.1.27

9 years ago

0.1.26

9 years ago

0.1.25

10 years ago

0.1.20

10 years ago

0.1.12

10 years ago

0.1.10

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago