fix: run IML function tests against draft code, not published code#338
Merged
Kateřina Beňová (KatBen-Make) merged 2 commits intoApr 17, 2026
Merged
Conversation
The function test runner was fetching all function code via the listing endpoint (/functions?code=true), which returns the published version. Now fetches each function's code via its direct endpoint (/functions/{name}/code) to get the latest draft, matching how test code is already fetched.
Made-with: Cursor
Generated |
Copilot started reviewing on behalf of
Kateřina Beňová (KatBen-Make)
March 20, 2026 16:14
View session
There was a problem hiding this comment.
Pull request overview
Updates the IML function test runner to execute against the latest draft function code by fetching each function’s code from its direct endpoint instead of using the listing endpoint that returns the published version.
Changes:
- Fetches function names via the listing endpoint and then fetches each function’s draft code via
/functions/{name}/code. - Runs test-code fetch and function-list fetch in parallel.
- Bumps package version to 2.5.1.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/commands/FunctionCommands.ts | Switches from bulk “published code” retrieval to per-function “draft code” retrieval for test execution. |
| package.json | Version bump to reflect the behavior change/fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Oleksandr Hushcha (o-hushcha)
requested changes
Apr 13, 2026
Oleksandr Hushcha (o-hushcha)
left a comment
There was a problem hiding this comment.
the changes LGTM, only one point regarding the version bump
see the comment below
Oleksandr Hushcha (o-hushcha)
approved these changes
Apr 15, 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.
JIRA: https://make.atlassian.net/browse/IEN-14781
The function test runner was fetching all function code via the listing endpoint (/functions?code=true), which returns the published version. Now fetches each function's code via its direct endpoint (/functions/{name}/code) to get the latest draft, matching how test code is already fetched.
Summary:
Test plan:
Open an already-published app with custom IML functions
Edit a function's code.js (e.g. change the return value)
Save the change (sends it to server as draft)
Run "Run IML test" (F6) — verify the test runs against the updated code, not the old published version
Verify tests still pass for unpublished (new) apps as before
Made-with: Cursor AI Opus 4.6