Refactor Karma/Jasmine integration tests to use mocks and enable all disabled tests#1584
Merged
Conversation
… using mocks Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
… passing Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
- Create dedicated integration-tests.yml workflow - Test on Node.js 20.x and 22.x - Build test artifacts and run karma integration tests - Upload coverage results as artifacts - All 72 integration tests now passing Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
- Improve test assertions in childSpec.js for calculation method tests - Add better comments explaining timing requirements in parentSpec.js - Revert over-aggressive throttle test assertion - Keep fallback timeout in anchorSpec.js for test reliability - All 72 tests passing Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
[WIP] Refactor iframe-resizer monorepo to V6 structure
Refactor Karma/Jasmine integration tests to use mocks and enable all disabled tests
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
37 integration tests were disabled across 8 spec files, primarily because they relied on real iframe creation which is unreliable in CI (timing issues, cross-origin restrictions, DOM rendering dependencies).
Changes
Test Refactoring
loadIFrame()pattern to mock-based approach using existingcreateMsg()andmockMsgListener()helperscheckOrigin: falseto test configs to avoid origin validation with mocked sourcesmanualResizevs deprecatedsizemessage type)Files Modified
spec/_initSpec.js- Enabled 6 tests (entire suite)spec/anchorSpec.js- Enabled 3 tests (entire suite)spec/childSpec.js- Enabled 7 tests (setTargetOrigin, calculation methods, performance throttling)spec/getPageInfoSpec.js- Enabled 1 test suitespec/initDomSpec.js- Enabled 1 testspec/initJQuerySpec.js- Enabled 1 testspec/parentSpec.js- Enabled 9 tests (4 suites: reset, late load, resize height)spec/sendMessageSpec.js- Enabled 2 testsCI Integration
.github/workflows/integration-tests.ymlfor dedicated integration test runs on Node.js 20.x/22.xExample Pattern
Before (unreliable):
After (deterministic):
All 72 tests now pass (~3s execution vs previous timing-dependent behavior).
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.