mirror of
https://github.com/cypress-io/cypress.git
synced 2026-03-14 05:10:45 -05:00
- fixes #1264 - fixes #1321 - fixes #1799 - fixes #2689 - fixes #2688 - fixes #2687 - fixes #2686
30 lines
690 B
JavaScript
30 lines
690 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', () => {
|
|
return snapshot(Object.keys(errors))
|
|
}
|
|
)
|
|
})
|
|
|
|
context('.errors.formErrorText', function () {
|
|
it('returns fully formed text message', () => {
|
|
return snapshot(formErrorText(missingXvfb))
|
|
}
|
|
)
|
|
})
|
|
})
|