Skip to content

Commit

Permalink
Update test to test new functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Sidell committed Jan 18, 2017
1 parent bf9c652 commit 2edff42
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/basic.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ describe('Namespace Tests', function(){
expect(filepath).to.eql(path.resolve('./tests/Namespace/Thing.js'));
});

it('Explodes if given no path', function(){
namespace.instance({'NS/': 'Namespace/'}, path.resolve('./tests'));
expect(Namespace.require).to.throwException();
});

it('Explodes if name is not in namespace', function(){
namespace.instance({'NS/': 'Namespace/'}, path.resolve('./tests'));
expect(Namespace.resolve).withArgs('NOTHERE/Thing.js').to.throwException();
Expand Down Expand Up @@ -261,6 +266,7 @@ describe('Namespace Tests', function(){

expect(space).to.have.length(3);
expect(space.map((listing) => listing.name()).sort()).to.eql(['Thing', 'Thing2', 'Thing3']);
expect(space.map((listing) => listing.base()).sort()).to.eql(['Thing.js', 'Thing2.js', 'Thing3.js']);
});

it('Require all in immediate namespace', function(){
Expand Down

0 comments on commit 2edff42

Please sign in to comment.