Skip to content

Commit

Permalink
Fixed TDD global namespace dependency injection
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Harrison committed Jan 17, 2013
1 parent 4910eef commit 00738d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tdd/test.js
Expand Up @@ -83,9 +83,10 @@
// Otherwise instantiate in global namespace
if (root.hasOwnProperty('test')) {
throw new Error('Cannot instantiate unit tester: Namespace collision.');
} else if (!root.hasOwnProperty('selecta')) {
throw new Error('Cannot instantiate unit tester: Dependencies not available.');
} else {
// TODO
// selecta is not available (??), so this fails in browser
var selecta = root.selecta;
root.test = test;
}
}
Expand Down

0 comments on commit 00738d8

Please sign in to comment.