Skip to content

test: add coverage for transformEngines function#10599

Closed
Copilot wants to merge 3 commits into
use-libnpmpublish-without-merge-conflict-test0from
copilot/sub-pr-10591-again
Closed

test: add coverage for transformEngines function#10599
Copilot wants to merge 3 commits into
use-libnpmpublish-without-merge-conflict-test0from
copilot/sub-pr-10591-again

Conversation

Copilot AI commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

The transformEngines function lacked test coverage for its transformation of engines.runtime to devEngines.runtime and validation logic.

Changes

  • Added transformEngines.test.ts with 7 test cases covering:
    • Runtime field migration from engines to devEngines
    • Preservation of existing devEngines fields
    • Conflict detection when both fields are defined
    • No-op behavior when engines.runtime is absent
    • Edge cases (empty engines object, manifests with additional fields)

All tests achieve 100% coverage of the transformEngines function.

Example

const manifest = {
  engines: {
    node: '>=18',
    runtime: { name: 'bun', version: '1.0.0' }
  }
}

transformEngines(manifest)
// Returns:
// {
//   engines: { node: '>=18' },
//   devEngines: { runtime: { name: 'bun', version: '1.0.0' } }
// }

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 12, 2026 13:14
Co-authored-by: KSXGitHub <11488886+KSXGitHub@users.noreply.github.com>
Co-authored-by: KSXGitHub <11488886+KSXGitHub@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP Address feedback on refactoring to replace npm publish test: add coverage for transformEngines function Feb 12, 2026
Copilot AI requested a review from KSXGitHub February 12, 2026 13:18
KSXGitHub added a commit that referenced this pull request Feb 12, 2026
@zkochan zkochan closed this in cc7c0d2 Feb 12, 2026
@KSXGitHub KSXGitHub deleted the copilot/sub-pr-10591-again branch February 12, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants