Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 50 lines (36 sloc) 1.103 kB
c7c4954 @eugeneware Release v1.0.1
authored
1 # Adds simple BDD to the expresso TDD framework
2
3 This project adds a simple extension to the expresso framework which translates a nested "describe"/"it should" structure into a flattened object that expresso will run.
4
5 **expressobdd** includes the 'should.js' framework so you get access to the BDD 'should' style assertions without needing to explicitly include it.
6
7 # Usage
8
9 Here's an example of how to use **expessobdd** in a file in 'test/mytest.js':
10
11 module.exports = require('expressobdd')({
12 'a test group': {
13 'test a': function() {
14 var x = 3;
15 x.should.eql(3);
16 },
17
18 'test b': function() {
19 var y = 4;
20 y.should.eql(4);
21 },
22
23 'another group': {
24 'test c': function() {
25 var x = 3;
26 x.should.eql(3);
27 },
28
29 'test d': function() {
30 var y = 4;
31 y.should.eql(4);
32 },
33 },
34 },
35
36 'it should be a simple test': function() {
37 var x = 2;
38 x.should.eql(2);
39 },
40 });
41
42 Then you can run the test above by:
43 $ expresso
44
45 # Installation
46
47 **expressobdd** is made available through the npm package system. To install just:
48
49 $ npm install expressobdd
Something went wrong with that request. Please try again.