Skip to content

Commit

Permalink
Add debug info to see what's making the tests fail
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba-orlik committed Jul 4, 2024
1 parent 7778a85 commit ddbf3c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { handler } from './index'
import { MCEvent } from '@managed-components/types'

describe('custom-html', () => {
it('executes html injection', () => {
it.only('executes html injection', () => {
const executedJS: string[] = []
const fakeEvent = new Event('pageview', {}) as MCEvent
fakeEvent.payload = {
Expand All @@ -26,6 +26,7 @@ describe('custom-html', () => {
},
}
handler(fakeEvent)
console.log({ executedJS })
expect(executedJS).toHaveLength(3)
expect(executedJS[0]).toEqual(
"const d = document.createElement('div');d.innerHTML = `<p>some text</p>\n" +
Expand Down

0 comments on commit ddbf3c4

Please # to comment.