Merge branch 'feat/improveErrorMessages' of https://github.com/dhoko/jasmine into dhoko-feat/improveErrorMessages

- Merges #1026 from @dhoko
- Fixes #1025
This commit is contained in:
slackersoft
2016-03-18 10:40:44 -07:00
16 changed files with 72 additions and 28 deletions

View File

@@ -0,0 +1,13 @@
describe('formatErrorMsg', function () {
it('should format an error with a domain', function() {
var formator = jasmineUnderTest.formatErrorMsg('api');
expect(formator('message')).toBe('api : message');
expect(formator('message2')).toBe('api : message2');
});
it('should format an error with a domain and usage', function() {
var formator = jasmineUnderTest.formatErrorMsg('api', 'with a param');
expect(formator('message')).toBe('api : message\nUsage: with a param');
expect(formator('message2')).toBe('api : message2\nUsage: with a param');
});
});