File tree Expand file tree Collapse file tree 5 files changed +28
-8
lines changed
Expand file tree Collapse file tree 5 files changed +28
-8
lines changed Original file line number Diff line number Diff line change 66 "$fresh/" : " ../" ,
77 "twind" : " https://esm.sh/twind@0.16.19" ,
88 "twind/" : " https://esm.sh/twind@0.16.19/" ,
9- "preact" : " https://esm.sh/preact@10.22.0 " ,
10- "preact/" : " https://esm.sh/preact@10.22.0 /" ,
11- "@preact/signals" : " https://esm.sh/*@preact/signals@1.2.2 " ,
12- "@preact/signals-core" : " https://esm.sh/@preact/signals-core@1.5.1 " ,
9+ "preact" : " https://esm.sh/preact@10.22.1 " ,
10+ "preact/" : " https://esm.sh/preact@10.22.1 /" ,
11+ "@preact/signals" : " https://esm.sh/*@preact/signals@1.3.0 " ,
12+ "@preact/signals-core" : " https://esm.sh/@preact/signals-core@1.7.0 " ,
1313 "@preact/signals-core@1.2.3" : " https://esm.sh/@preact/signals-core@1.2.3" ,
1414 "@preact/signals-core@1.3.0" : " https://esm.sh/@preact/signals-core@1.3.0" ,
1515 "$prism" : " https://esm.sh/prismjs@1.29.0" ,
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ function createRootFragment(
3636 endMarker : Text | Comment ,
3737) {
3838 // @ts -ignore this is fine
39- return parent . __k = {
39+ const rootFrag = parent . __k = {
4040 _frshRootFrag : true ,
4141 nodeType : 1 ,
4242 parentNode : parent ,
@@ -70,7 +70,20 @@ function createRootFragment(
7070 removeChild ( child : Node ) {
7171 parent . removeChild ( child ) ;
7272 } ,
73+ contains ( node : Node | null ) : boolean {
74+ if ( node === null ) return false ;
75+
76+ const children = rootFrag . childNodes ;
77+ for ( let i = 0 ; i < children . length ; i ++ ) {
78+ if ( children [ i ] . contains ( node ) ) {
79+ return true ;
80+ }
81+ }
82+ return false ;
83+ } ,
7384 } ;
85+
86+ return rootFrag ;
7487}
7588
7689function isCommentNode ( node : Node ) : node is Comment {
Original file line number Diff line number Diff line change 22 "lock" : false ,
33 "imports" : {
44 "$fresh/" : " ../../" ,
5- "preact" : " https://esm.sh/preact@10.22.0 " ,
6- "preact/" : " https://esm.sh/preact@10.22.0 /" ,
5+ "preact" : " https://esm.sh/preact@10.22.1 " ,
6+ "preact/" : " https://esm.sh/preact@10.22.1 /" ,
77 "@preact/signals" : " https://esm.sh/*@preact/signals@1.1.5" ,
88 "@preact/signals-core" : " https://esm.sh/@preact/signals-core@1.3.1"
99 },
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ import * as $folder_subfolder_Counter from "./islands/folder/subfolder/Counter.t
103103import * as $kebab_case_counter_test from "./islands/kebab-case-counter-test.tsx" ;
104104import * as $route_groups_islands_islands_Counter from "./routes/route-groups-islands/(_islands)/Counter.tsx" ;
105105import * as $route_groups_islands_islands_invalid from "./routes/route-groups-islands/(_islands)/invalid.tsx" ;
106- import { type Manifest } from "$fresh/server.ts" ;
106+ import type { Manifest } from "$fresh/server.ts" ;
107107
108108const manifest = {
109109 routes : {
Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ import {
1212
1313Deno . test ( "island tests" , async ( t ) => {
1414 await withPage ( async ( page , address ) => {
15+ const logs = [ ] ;
16+ page . on ( "pageerror" , ( ev ) => {
17+ logs . push ( ev . message ) ;
18+ } ) ;
19+
1520 async function counterTest ( counterId : string , originalValue : number ) {
1621 const pElem = await page . waitForSelector ( `#${ counterId } > p` ) ;
1722
@@ -46,6 +51,8 @@ Deno.test("island tests", async (t) => {
4651 ?. [ 1 ] ! ;
4752 assertStringIncludes ( srcString , imgFilePath ) ;
4853 } ) ;
54+
55+ assertEquals ( logs . length , 0 , "No error logs" ) ;
4956 } ) ;
5057} ) ;
5158
You can’t perform that action at this time.
0 commit comments