-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c77b2c7
commit c1fbd02
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`formatMessage returns a list of strings suitable for console logging 1`] = ` | ||
Array [ | ||
"%c apollo %cquery %cFormatMessageQuery %c(in 1000 ms)", | ||
] | ||
`; | ||
|
||
exports[`formatMessage returns a list of strings suitable for console logging 2`] = ` | ||
Array [ | ||
"%c apollo %cmutation %cFormatMessageMutation %c(in 500 ms)", | ||
] | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const formatMessage = require('../formatMessage'); | ||
|
||
describe('formatMessage', () => { | ||
it('returns a list of strings suitable for console logging', () => { | ||
expect( | ||
formatMessage('query', { operationName: 'FormatMessageQuery' }, 1000), | ||
).toMatchSnapshot(); | ||
|
||
expect( | ||
formatMessage( | ||
'mutation', | ||
{ operationName: 'FormatMessageMutation' }, | ||
500, | ||
), | ||
).toMatchSnapshot(); | ||
}); | ||
}); |