MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / make

Function make

javascript/selenium-webdriver/project_bidi_schema_test.mjs:534–549  ·  view source on GitHub ↗
(fieldName, withId = true)

Source from the content-addressed store, hash-verified

532
533 it('exempts the envelope `result` position but flags any other correlated reference', () => {
534 const make = (fieldName, withId = true) => ({
535 schemaVersion: 1,
536 commands: [],
537 events: [],
538 types: {
539 Envelope: {
540 kind: 'record',
541 fields: [
542 ...(withId ? [{ name: 'id', wire: 'id', required: true, type: { primitive: 'integer' } }] : []),
543 { name: fieldName, wire: fieldName, required: true, type: { ref: 'x.ResultData' } },
544 ],
545 },
546 'x.ResultData': { kind: 'union', variants: ['x.A'], selector: { correlated: true } },
547 'x.A': { kind: 'record', fields: [] },
548 },
549 })
550 assert.deepEqual(checkSchema(make('result')), []) // the envelope's correlation point — allowed
551 assert.deepEqual(checkSchema(make('payload')), [
552 'Envelope.payload: correlated union x.ResultData is reachable as a value (needs a payload selector)',

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected