Skip to content

Commit

Permalink
release 1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ch-andrewrhyne committed Sep 7, 2017
1 parent b0fe790 commit e883f2e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

1.5.1 / 2017-09-07
==================

* Package: Added new keywords (@thebigredgeek)
* Docs: Updated docs to reference [apollo-server](https://dev.apollodata.com/tools/apollo-server/setup.html) (@thebigredgeek)

1.5.0 / 2017-08-29
==================

Expand Down
9 changes: 6 additions & 3 deletions test/spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { expect } from 'chai';
import assert from 'assert';

import { createError, formatError } from '../dist';

const { AssertionError } = assert;

describe('createError', () => {
context('when properly used', () => {
it('returns an error that serializes properly', () => {
Expand Down Expand Up @@ -46,7 +49,7 @@ describe('createError', () => {
createError('FooError');
throw new Error('did not throw as expected');
} catch (err) {
expect(err.name).to.equal('AssertionError [ERR_ASSERTION]');
expect(err instanceof AssertionError).to.be.true;
expect(err.message).to.equal('createError requires a config object as the second parameter');
}
});
Expand All @@ -55,11 +58,11 @@ describe('createError', () => {
it('throws an assertion error with a useful message', () => {
try {
createError('FooError', {

});
throw new Error('did not throw as expected');
} catch (err) {
expect(err.name).to.equal('AssertionError [ERR_ASSERTION]');
expect(err instanceof AssertionError).to.be.true;
expect(err.message).to.equal('createError requires a "message" property on the config object passed as the second parameter')
}
});
Expand Down

0 comments on commit e883f2e

Please sign in to comment.