mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-06 22:49:46 -06:00
* chore: set up sharing of react via module federation in studio * chore: add ability to load types from the studio bundle * fix build * fix build * fix build * PR comments * Update guides/studio-development.md Co-authored-by: Matt Schile <mschile@cypress.io> * fix test --------- Co-authored-by: Matt Schile <mschile@cypress.io>
22 lines
589 B
TypeScript
22 lines
589 B
TypeScript
import { expect } from 'chai'
|
|
import { requireScript } from '../../../lib/cloud/require_script'
|
|
|
|
describe('require_script', () => {
|
|
it('requires the script correctly', () => {
|
|
const script = `
|
|
module.exports = {
|
|
StudioManager: class {
|
|
constructor ({ studioPath }) {
|
|
this.studioPath = studioPath
|
|
}
|
|
}
|
|
}
|
|
`
|
|
const { StudioManager } = requireScript<{ StudioManager: any }>(script)
|
|
|
|
const studio = new StudioManager({ studioPath: '/path/to/studio' })
|
|
|
|
expect(studio.studioPath).to.equal('/path/to/studio')
|
|
})
|
|
})
|