Skip to content

Commit e883f2e

Browse files
release 1.5.1
1 parent b0fe790 commit e883f2e

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11

2+
1.5.1 / 2017-09-07
3+
==================
4+
5+
* Package: Added new keywords (@thebigredgeek)
6+
* Docs: Updated docs to reference [apollo-server](https://dev.apollodata.com/tools/apollo-server/setup.html) (@thebigredgeek)
7+
28
1.5.0 / 2017-08-29
39
==================
410

test/spec.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { expect } from 'chai';
2+
import assert from 'assert';
23

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

6+
const { AssertionError } = assert;
7+
58
describe('createError', () => {
69
context('when properly used', () => {
710
it('returns an error that serializes properly', () => {
@@ -46,7 +49,7 @@ describe('createError', () => {
4649
createError('FooError');
4750
throw new Error('did not throw as expected');
4851
} catch (err) {
49-
expect(err.name).to.equal('AssertionError [ERR_ASSERTION]');
52+
expect(err instanceof AssertionError).to.be.true;
5053
expect(err.message).to.equal('createError requires a config object as the second parameter');
5154
}
5255
});
@@ -55,11 +58,11 @@ describe('createError', () => {
5558
it('throws an assertion error with a useful message', () => {
5659
try {
5760
createError('FooError', {
58-
61+
5962
});
6063
throw new Error('did not throw as expected');
6164
} catch (err) {
62-
expect(err.name).to.equal('AssertionError [ERR_ASSERTION]');
65+
expect(err instanceof AssertionError).to.be.true;
6366
expect(err.message).to.equal('createError requires a "message" property on the config object passed as the second parameter')
6467
}
6568
});

0 commit comments

Comments
 (0)