graphql-go icon indicating copy to clipboard operation
graphql-go copied to clipboard

Changing error comparision in testing

Open nikkon226 opened this issue 6 years ago • 0 comments

When running tests, the errors are not equal. When using []*errors.QueryError{errors.Errorf("%s",msg)}, all things being equal the errors are returned as unequal. Comparing just the messages will be adequate for application development environments.

The errors that are returned by the internal package cannot be duplicated (easily) when testing. This will allow the messages to be compared as it is the only required component that will be returned in the QueryError struct.

nikkon226 avatar Jun 18 '18 16:06 nikkon226