Skip to content

Commit f78caea

Browse files
committed
Have unit tests together in a folder within test/
Will allow for having e2e and unit tests in the future Bugfix mock body not passed
1 parent b82c476 commit f78caea

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = function (grunt) {
2727
reporter: 'list'
2828
},
2929
src: [
30-
'test/*.js'
30+
'test/unit/**/*.js'
3131
]
3232
}
3333
}

libs/abe-express.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var request = require('supertest'),
33
expressMockCheck = {
44
full: function (app, mock, example, done) {
55
var exampleMock = mock.examples[example],
6+
mockBody = exampleMock.request.body,
67
testHeaders = require('./headers.js')(exampleMock),
78
testBody = require('./body.js')(exampleMock, done);
89

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var expect = require('expect.js'),
2-
abeExpress = require('../libs/abe-express.js');
2+
abeExpress = require('../../libs/abe-express.js');
33

44
describe('ABE Express response test helper', function () {
55
it('Should be able to test the headers or body', function () {

test/body.js renamed to test/unit/body.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var path = require('path'),
22
expect = require('expect.js'),
3-
bodyLib = path.join('../libs/body.js'),
3+
bodyLib = path.join('../../libs/body.js'),
44
exampleMock = {
55
response: {}
66
};

test/headers.js renamed to test/unit/headers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var path = require('path'),
22
expect = require('expect.js'),
3-
headerLib = path.join('../libs/headers.js'),
3+
headerLib = path.join('../../libs/headers.js'),
44
exampleMock = {
55
response: {
66
status: 200,

0 commit comments

Comments
 (0)