You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace !isRealBrowser() with isHappyDom() across test guards
`if (!isRealBrowser()) return ctx.skip('happy-dom: reason')` was a
double-negative detour — the check says "not a real browser" but the
skip reason always starts with "happy-dom:". Say what we mean directly.
All 24 guards now read:
it('name', function (ctx: any) {
if (isHappyDom()) return ctx.skip('happy-dom: reason')
// body
})
Also drops `isRealBrowser` and `isNode` from test-env.ts (neither had a
real consumer — `isNode` was scaffolding for the deferred `cli-bun`
project, and `isRealBrowser` was the double-negated wrapper of
`isHappyDom`). When we bring back a node-env project we can add them
back alongside the package.json runtime declaration scheme.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@@ -200,7 +200,7 @@ describe('Binding: Options', function () {
200
200
})
201
201
202
202
it('Should trigger a change event when the options selection is populated or changed by modifying the options data (single select)',function(ctx: any){
203
-
if(!isRealBrowser())returnctx.skip('happy-dom: selectedIndex does not follow reordered <option>')
203
+
if(isHappyDom())returnctx.skip('happy-dom: selectedIndex does not follow reordered <option>')
@@ -298,7 +298,7 @@ describe('Binding: Options', function () {
298
298
})
299
299
300
300
it('Should allow the caption to be given by an observable, and update it when the model value changes (without affecting selection)',function(ctx: any){
301
-
if(!isRealBrowser())returnctx.skip('happy-dom: element.options[selectedIndex] can be undefined')
301
+
if(isHappyDom())returnctx.skip('happy-dom: element.options[selectedIndex] can be undefined')
0 commit comments