Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/error/__tests__/GraphQLError-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ describe('GraphQLError', () => {

it('converts nodes to positions and locations', () => {
const e = new GraphQLError('msg', [fieldNode]);
expect(e).to.have.property('source', source);
expect(e).to.deep.include({
source,
nodes: [fieldNode],
positions: [4],
locations: [{ line: 2, column: 3 }],
Expand All @@ -82,8 +82,8 @@ describe('GraphQLError', () => {

it('converts single node to positions and locations', () => {
const e = new GraphQLError('msg', fieldNode); // Non-array value.
expect(e).to.have.property('source', source);
expect(e).to.deep.include({
source,
nodes: [fieldNode],
positions: [4],
locations: [{ line: 2, column: 3 }],
Expand All @@ -92,8 +92,8 @@ describe('GraphQLError', () => {

it('converts node with loc.start === 0 to positions and locations', () => {
const e = new GraphQLError('msg', operationNode);
expect(e).to.have.property('source', source);
expect(e).to.deep.include({
source,
nodes: [operationNode],
positions: [0],
locations: [{ line: 1, column: 1 }],
Expand All @@ -102,8 +102,8 @@ describe('GraphQLError', () => {

it('converts source and positions to locations', () => {
const e = new GraphQLError('msg', null, source, [6]);
expect(e).to.have.property('source', source);
expect(e).to.deep.include({
source,
nodes: undefined,
positions: [6],
locations: [{ line: 2, column: 5 }],
Expand Down