mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-31 03:29:43 -06:00
* wip [skip ci] update * wip [skip ci] update test * [skip ci] fix env var * bump sinon, create helper utility to always throw when a stub is called without being given stubbed behavior * update failing specs * fix some error messages * update snapshot * warning -> note, add snapshot tests * change snapshot os.release, test env vars
28 lines
660 B
JavaScript
28 lines
660 B
JavaScript
require('../spec_helper')
|
|
|
|
const os = require('os')
|
|
const snapshot = require('snap-shot-it')
|
|
const { errors, formErrorText } = require(`${lib}/errors`)
|
|
const util = require(`${lib}/util`)
|
|
|
|
describe('errors', function () {
|
|
const { missingXvfb } = errors
|
|
|
|
beforeEach(function () {
|
|
sinon.stub(util, 'pkgVersion').returns('1.2.3')
|
|
os.platform.returns('test platform')
|
|
})
|
|
|
|
describe('individual', () => {
|
|
it('has the following errors', () =>
|
|
snapshot(Object.keys(errors))
|
|
)
|
|
})
|
|
|
|
context('.errors.formErrorText', function () {
|
|
it('returns fully formed text message', () =>
|
|
snapshot(formErrorText(missingXvfb))
|
|
)
|
|
})
|
|
})
|