text: /* eslint-env browser */
  
  import * as Y from 'yjs'
  import { CrossTabProvider } from '../src/y-bc.js'
  
  const ydoc = new Y.Doc()
  const provider = new CrossTabProvider('crosstab-aka-broadcastchannel-test', ydoc)
  const yarray = ydoc.getArray()
  
  yarray.observeDeep(() => {
    console.log('yarray updated: ', yarray.toJSON())
  })
  
  // @ts-ignore
  window.example = { provider, ydoc, yarray }
  
  setTimeout(() => {
    // console.debug("(you should see 'yarray updated:...' when window.example.yarray is modified.")
    // Reference, if you want to tinker: https://docs.yjs.dev/api/shared-types/y.array
    window.example.yarray.insert(0, [1, 2, 3])
  })
  