fix: use toMatch in ANSI color due to appveyor issue

This commit is contained in:
Clark Du 2018-04-20 12:13:21 +08:00
parent a4c84eced3
commit 592c7159a5
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9
2 changed files with 5 additions and 12 deletions

View File

@ -1,11 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`basic generate Format errors 1`] = `
" GEN ERR  /h1

\\"page not found\\"

 GEN ERR  /h2

unhandled error stack"
`;

View File

@ -48,7 +48,11 @@ describe('basic generate', () => {
{ type: 'handled', route: '/h1', error: 'page not found' },
{ type: 'unhandled', route: '/h2', error: { stack: 'unhandled error stack' } }
])
expect(error).toMatchSnapshot()
expect(error).toMatch(' GEN ERR ')
expect(error).toMatch(' /h1')
expect(error).toMatch(' /h2')
expect(error).toMatch('"page not found"')
expect(error).toMatch('unhandled error stack')
})
test('/stateless', async () => {