Skip to content

Commit

Permalink
Use strict equal test instead
Browse files Browse the repository at this point in the history
Signed-off-by: petetnt <[email protected]>
  • Loading branch information
petetnt committed Jan 24, 2018
1 parent f32d3fd commit 3a14cd1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ describe('Integration', () => {
const children = doc.getElementById('graphql-inclusion').children;

// .graphql
expect(children[0].textContent.replace(/\s/g, '')).to.match(
/^{"kind":"Document","definitions":\[{"kind":"OperationDefinition","operation":"query","variableDefinitions":\[],"directives":\[\],"selectionSet":{"kind":"SelectionSet","selections":\[{"kind":"Field","name":{"kind":"Name","value":"test"},"arguments":\[{"kind":"Argument","name":{"kind":"Name","value":"test"},"value":{"kind":"StringValue","value":"test","block":false}}\],"directives":\[\],"selectionSet":{"kind":"SelectionSet","selections":\[{"kind":"Field","name":{"kind":"Name","value":"test"},"arguments":\[\],"directives":\[\]}\]}}\]}}\],"loc":{"start":0,"end":41}}$/
expect(children[0].textContent.replace(/\s/g, '')).to.equal(
'{"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","variableDefinitions":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"test"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"test"},"value":{"kind":"StringValue","value":"test","block":false}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"test"},"arguments":[],"directives":[]}]}}]}}],"loc":{"start":0,"end":40,"source":{"body":"{\\\\ntest(test:\\\\"test\\\\"){\\\\ntest\\\\n}\\\\n}\\\\n","name":"GraphQLrequest","locationOffset":{"line":1,"column":1}}}}'
);

// .gql
expect(children[1].textContent.replace(/\s/g, '')).to.match(
/^{"kind":"Document","definitions":\[{"kind":"OperationDefinition","operation":"query","variableDefinitions":\[],"directives":\[\],"selectionSet":{"kind":"SelectionSet","selections":\[{"kind":"Field","name":{"kind":"Name","value":"test"},"arguments":\[{"kind":"Argument","name":{"kind":"Name","value":"test"},"value":{"kind":"StringValue","value":"test","block":false}}\],"directives":\[\],"selectionSet":{"kind":"SelectionSet","selections":\[{"kind":"Field","name":{"kind":"Name","value":"test"},"arguments":\[\],"directives":\[\]}\]}}\]}}\],"loc":{"start":0,"end":41}}$/
expect(children[1].textContent.replace(/\s/g, '')).to.equal(
'{"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","variableDefinitions":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"test"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"test"},"value":{"kind":"StringValue","value":"test","block":false}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"test"},"arguments":[],"directives":[]}]}}]}}],"loc":{"start":0,"end":40,"source":{"body":"{\\\\ntest(test:\\\\"test\\\\"){\\\\ntest\\\\n}\\\\n}\\\\n","name":"GraphQLrequest","locationOffset":{"line":1,"column":1}}}}'
);
});

Expand Down

0 comments on commit 3a14cd1

Please sign in to comment.