@revoloo/cypress6
Version:
Cypress.io end to end testing tool
24 lines (21 loc) • 534 B
text/typescript
import {
_restoreMatcherOptionsTypes,
} from '../../lib/server/driver-events'
import { expect } from 'chai'
describe('driver events', function () {
context('._restoreMatcherOptionsTypes', function () {
it('rehydrates regexes properly', function () {
const { url } = _restoreMatcherOptionsTypes({
url: {
type: 'regex',
value: '/aaa/igm',
},
})
expect(url).to.be.instanceOf(RegExp)
.and.include({
flags: 'gim',
source: 'aaa',
})
})
})
})