-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from poetic/location-type-errors
Added check to tell the user if the locationType is not set to hash
- Loading branch information
Showing
4 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
var addon = require('../../index'); | ||
|
||
function expectWithConfig(baseConfig, env) { | ||
return expect(addon.config.bind(addon, env || 'development', baseConfig)); | ||
} | ||
|
||
describe('Addon', function() { | ||
describe('config', function() { | ||
describe('validates location type', function() { | ||
it('should throw Error', function() { | ||
expectWithConfig({locationType: 'auto'}).to.throw(Error); | ||
}); | ||
it('should not throw an error', function() { | ||
expectWithConfig({locationType: 'hash'}).to.not.throw(Error); | ||
}); | ||
it('should not throw an error on test', function() { | ||
expectWithConfig({locationType: 'auto'}, 'test').to.not.throw(Error); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters