Skip to content

Commit

Permalink
Tidy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjbradshaw committed Aug 28, 2024
1 parent 440cab7 commit 8a3b4ac
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spec/childSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ define(['iframeResizerChild', 'jquery'], (mockMsgListener, $) => {

describe('ParentIFrame methods', () => {
it('autoResize', () => {
win.parentIframe.autoResize(false)
win.parentIFrame.autoResize(true)

expect(console.log).toHaveBeenCalledWith(
'[iframe-resizer][parentIFrameTests] Trigger event: Auto Resize enabled',
'[iframe-resizer][parentIFrameTests] Sending message to host page (parentIFrameTests:0:0:autoResize:true) via postMessage',
)
})

Expand Down Expand Up @@ -231,7 +232,7 @@ define(['iframeResizerChild', 'jquery'], (mockMsgListener, $) => {
mockMsgListener(createMsg('resize'))

expect(console.log).toHaveBeenCalledWith(
'[iframe-resizer][parentIFrameTests] Trigger event: Parent window requested size check',
'[iframe-resizer][parentIFrameTests] height calculation method set to "max"',
)
})

Expand All @@ -240,7 +241,7 @@ define(['iframeResizerChild', 'jquery'], (mockMsgListener, $) => {
mockMsgListener(createMsg('resize'))

expect(console.log).toHaveBeenCalledWith(
'[iframe-resizer][parentIFrameTests] Trigger event: Parent window requested size check',
'[iframe-resizer][parentIFrameTests] height calculation method set to "lowestElement"',
)
})

Expand All @@ -249,7 +250,7 @@ define(['iframeResizerChild', 'jquery'], (mockMsgListener, $) => {
mockMsgListener(createMsg('resize'))

expect(console.log).toHaveBeenCalledWith(
'[iframe-resizer][parentIFrameTests] Trigger event: Parent window requested size check',
'[iframe-resizer][parentIFrameTests] width calculation method set to "rightMostElement"',
)
})

Expand Down

0 comments on commit 8a3b4ac

Please sign in to comment.