Files
ECC/tests/scripts
montjeffrey df82e75a4c test(carriers): pin exact import resolution, portable separators, and regex after a condition
Review on aec97150 found four ways the closure gate passes a carrier that
fails at run time. Each is reproduced here against the current head:

- import('./helper') with only helper.js planned is accepted, but Node's
  ESM resolver does no extension search.
- import('./data') with only data/index.json (or index.js) planned is
  accepted, but Node rejects directory imports even from CommonJS.
- require('./lib\helper.js') with lib/helper.js planned is accepted
  because backslashes were normalized, but Linux and macOS read the
  backslash as part of the filename.
- In `if (ok) /['"]/.test(text); require('./missing')` the regex after
  the condition's closing paren is read as division, its quote opens a
  fake string, and the require disappears.

Controls that must keep passing: an exact import() of a planned file, an
extensionless require through the CommonJS search, and division after a
method named `if` or a call nested inside a condition. extractReferences
gains an `imports` list so the resolver can tell the two forms apart.
2026-10-10 18:00:50 -04:00
..