test(coding-agent): fixed environment-sensitive and stale-trigger test failures
- Shimmed writable select.value in export-html harness; linkedom's getter-only HTMLSelectElement.value made template.js theme assignment throw under strict mode.
- Bound the oauth-flow port blocker to 127.0.0.1 explicitly; macOS lets a specific-address bind coexist with a wildcard one, so the flow bound the blocked port and never fell back.
- Re-anchored atomic-rewrite race tests on rewriteEntries() after the compaction-supersede rewrite trigger was removed in cb63ebd.
This commit is contained in:
@@ -45,6 +45,19 @@ function renderSession(session: MinimalSession) {
|
||||
value: () => ({ matches: false, addEventListener() {}, removeEventListener() {} }),
|
||||
configurable: true,
|
||||
});
|
||||
// linkedom's HTMLSelectElement.value is getter-only; template.js assigns it
|
||||
// under 'use strict', which would throw. Shim a writable value like a browser.
|
||||
const themeSelect = document.getElementById("theme-select");
|
||||
if (themeSelect) {
|
||||
let themeValue = "auto";
|
||||
Object.defineProperty(themeSelect, "value", {
|
||||
get: () => themeValue,
|
||||
set: next => {
|
||||
themeValue = String(next);
|
||||
},
|
||||
configurable: true,
|
||||
});
|
||||
}
|
||||
|
||||
const context = vm.createContext({
|
||||
window,
|
||||
|
||||
Reference in New Issue
Block a user