the full code is:
import {initializeBiEvents} from './helpers'
test('Full Sanity', async t => {
await t.maximizeWindow()
await initializeBiEvents(t)
await t.click(.......
where initializeBiEvents is:
const setBiEventsOnConsole = ClientFunction(() => {
window.trackEventByParams = function(category, event, label, value, extraData) {
console.info('[BI Event]', JSON.stringify({category, event, label, value, extraData}))
}
})
export const initializeBiEvents = async t => {
await setBiEventsOnConsole.with({boundTestRun: t})
}