Skip to content
This repository has been archived by the owner on Aug 9, 2018. It is now read-only.

Commit

Permalink
Add tests for fake ngRoute/ngAnimate modules
Browse files Browse the repository at this point in the history
  • Loading branch information
kshay committed Jul 23, 2014
1 parent 2573e45 commit ff442ec
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/wrap_middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var path = require('path');

exports.testWrapMiddleware = function (test) {
test.expect(11);
test.expect(13);
var angularServer = require('../lib/main.js');

var server = angularServer.Server(
Expand Down Expand Up @@ -43,6 +43,16 @@ exports.testWrapMiddleware = function (test) {
'angularjs-server module registered'
);

test.ok(
angular.modulesRegistered.indexOf('ngRoute') !== -1,
'fake ngRoute module registered'
);

test.ok(
angular.modulesRegistered.indexOf('ngAnimate') !== -1,
'fake ngAnimate module registered'
);

test.ok(
angular.requestsRegistered.length === 1,
'nodejs request was registered exactly once'
Expand Down

0 comments on commit ff442ec

Please sign in to comment.