[PR #154] [CLOSED] fix(tests): avoid Function constructor in codegen parity tests #354

Closed
opened 2026-05-06 12:39:23 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/154
Author: @NathanDrake2406
Created: 2/27/2026
Status: Closed

Base: mainHead: codex/fix-tests-no-implied-eval


📝 Commits (1)

  • 532756f fix(tests): avoid Function constructor in codegen parity tests

📊 Changes

1 file changed (+16 additions, -6 deletions)

View changed files

📝 tests/shims.test.ts (+16 -6)

📄 Description

Summary

  • replace new Function(...) usage in middleware codegen parity tests with runInNewContext from node:vm
  • preserve existing behavior assertions while removing no-implied-eval warnings

Verification

  • pnpm run lint
  • pnpm test tests/shims.test.ts

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/154 **Author:** [@NathanDrake2406](https://github.com/NathanDrake2406) **Created:** 2/27/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/fix-tests-no-implied-eval` --- ### 📝 Commits (1) - [`532756f`](https://github.com/cloudflare/vinext/commit/532756f8aa4d1caa4688ed6731ab085670196a84) fix(tests): avoid Function constructor in codegen parity tests ### 📊 Changes **1 file changed** (+16 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `tests/shims.test.ts` (+16 -6) </details> ### 📄 Description ## Summary - replace `new Function(...)` usage in middleware codegen parity tests with `runInNewContext` from `node:vm` - preserve existing behavior assertions while removing `no-implied-eval` warnings ## Verification - pnpm run lint - pnpm test tests/shims.test.ts --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:39:23 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#354
No description provided.