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

Commit

Permalink
fix(mock): checking mocks.module function before running
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Feb 22, 2016
1 parent c673075 commit da5a1e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dist/ng-describe.js
Original file line number Diff line number Diff line change
Expand Up @@ -3280,6 +3280,8 @@ if (String(/a/mig) !== '/a/gim') {
bdd.beforeEach(function checkEnvironment() {
la(check.object(root.angular), 'angular is undefined');
la(check.has(root.angular, 'mock'), 'angular.mock is undefined');
la(check.fn(root.angular.mock.module),
'missing angular mock module fn, is running inside jasmine or mocha?');
});

bdd.beforeEach(function mockModules() {
Expand Down
2 changes: 2 additions & 0 deletions src/ng-describe.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@
bdd.beforeEach(function checkEnvironment() {
la(check.object(root.angular), 'angular is undefined');
la(check.has(root.angular, 'mock'), 'angular.mock is undefined');
la(check.fn(root.angular.mock.module),
'missing angular mock module fn, is running inside jasmine or mocha?');
});

bdd.beforeEach(function mockModules() {
Expand Down

0 comments on commit da5a1e1

Please sign in to comment.