Unverified Commit 8b1b7d5e authored by vercel-fleet-prod[bot]'s avatar vercel-fleet-prod[bot] Committed by GitHub

Allow GTM metadata in third-party event assertions

Co-authored-by: 's avatarWill Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
parent 04dbe452
......@@ -59,7 +59,9 @@ describe('@next/third-parties basic usage', () => {
const clickEvents = await browser.eval(
'window.dataLayer.filter((entry) => entry.event === "buttonClicked")'
)
expect(clickEvents).toEqual([{ event: 'buttonClicked', value: 'xyz' }])
expect(clickEvents).toEqual([
expect.objectContaining({ event: 'buttonClicked', value: 'xyz' }),
])
})
})
......@@ -91,7 +93,9 @@ describe('@next/third-parties basic usage', () => {
const clickEvents = await browser.eval(
'window.dataLayer.filter((entry) => entry[0]?.event === "buttonClicked").map((entry) => entry[0])'
)
expect(clickEvents).toEqual([{ event: 'buttonClicked', value: 'xyz' }])
expect(clickEvents).toEqual([
expect.objectContaining({ event: 'buttonClicked', value: 'xyz' }),
])
})
})
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment