Files
cypress/packages/runner-shared/test/utils.ts
Lachlan Miller f49ad641e6 chore: delete unsed code in runner, runner-shared, runner-ct (#20663)
* chore: delete a lot of old code

* remove unused code

* update test

* remove dep on cypress_runner for non proxied page

* change binary

* revert scss changes

* delete a lot of code

* update sass

* update jsx

* styles

* revert change

* dont destructure from window.mobx anymore

* update readmes

* revert change to mobx store

* Update packages/runner-shared/README.md

Co-authored-by: Emily Rohrbough  <emilyrohrbough@users.noreply.github.com>

* remove old code

* remove html webpack and copy webpack plugins from runner

* Apply suggestions from code review

Co-authored-by: Emily Rohrbough  <emilyrohrbough@users.noreply.github.com>

Co-authored-by: Emily Rohrbough  <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
2022-03-25 10:24:05 +10:00

22 lines
657 B
TypeScript

import $Cypress from '@packages/driver'
import { EventManager } from '@packages/app/src/runner/event-manager'
import type { Socket } from '@packages/socket/lib/browser'
import { StudioRecorder } from '../src/studio'
import * as MobX from 'mobx'
export const StubWebsocket = new Proxy<Socket>(Object.create(null), {
get: (obj, prop) => {
throw Error(`Cannot access ${String(prop)} on StubWebsocket!`)
},
})
export const createEventManager = () => {
return new EventManager(
$Cypress,
MobX,
{}, // TODO: Bring back "Cypress Studio" and integrate with 10.x runner // selectorPlaygroundModel
StudioRecorder,
StubWebsocket,
)
}