mirror of
https://github.com/cypress-io/cypress.git
synced 2026-03-15 05:40:29 -05:00
* feat: normalize webpack errors * move some files to TS * add tests * simplify test * improve types Co-authored-by: Jessica Sachs <jess@jessicasachs.io>
15 lines
332 B
TypeScript
15 lines
332 B
TypeScript
import { expect } from 'chai'
|
|
import { normalizeError } from '../../src/plugin'
|
|
|
|
describe('normalizeError', () => {
|
|
it('normalizes Error to string', () => {
|
|
const e = new Error('Bad')
|
|
|
|
expect(normalizeError(e)).to.eq('Bad')
|
|
})
|
|
|
|
it('returns string as is', () => {
|
|
expect(normalizeError('Bad')).to.eq('Bad')
|
|
})
|
|
})
|