@@ -43,11 +43,11 @@ func (tl *testLocker) Unlock() {
4343
4444func Test_JsVar_JawsRender (t * testing.T ) {
4545 th := newTestHelper (t )
46- rq := newTestRequest ()
46+ rq := newTestRequest (t )
4747 defer rq .Close ()
4848
4949 nextJid = 0
50- rq .jw .AddTemplateLookuper (template .Must (template .New ("jsvartemplate" ).Parse (`{{$.JsVar "` + varname + `" .Dot}}` )))
50+ rq .Jaws .AddTemplateLookuper (template .Must (template .New ("jsvartemplate" ).Parse (`{{$.JsVar "` + varname + `" .Dot}}` )))
5151
5252 var mu deadlock.RWMutex
5353 var val valtype
@@ -88,7 +88,7 @@ func Test_JsVar_Update(t *testing.T) {
8888 var val valtype
8989 dot := NewJsVar (& mu , & val )
9090
91- rq := newTestRequest ()
91+ rq := newTestRequest (t )
9292 defer rq .Close ()
9393
9494 elem := rq .NewElement (dot )
@@ -107,7 +107,7 @@ func Test_JsVar_Update(t *testing.T) {
107107 select {
108108 case <- th .C :
109109 th .Timeout ()
110- case gotMsg := <- rq .outCh :
110+ case gotMsg := <- rq .OutCh :
111111 wantMsg := wsMsg {
112112 Data : "={\" String\" :\" x\" ,\" Number\" :2}" ,
113113 Jid : 1 ,
@@ -166,7 +166,7 @@ func Test_JsVar_Event(t *testing.T) {
166166 select {
167167 case <- th .C :
168168 th .Timeout ()
169- case rq1 .inCh <- wsMsg {Jid : 1 , What : what .Set , Data : "={\" String\" :\" y\" ,\" Number\" :3}" }:
169+ case rq1 .InCh <- wsMsg {Jid : 1 , What : what .Set , Data : "={\" String\" :\" y\" ,\" Number\" :3}" }:
170170 }
171171
172172 select {
@@ -180,7 +180,7 @@ func Test_JsVar_Event(t *testing.T) {
180180 select {
181181 case <- th .C :
182182 th .Timeout ()
183- case msg := <- rq1 .outCh :
183+ case msg := <- rq1 .OutCh :
184184 s := msg .Format ()
185185 after , found := strings .CutPrefix (s , "Set\t Jid.1\t =" )
186186 th .Equal (found , true )
@@ -197,7 +197,7 @@ func Test_JsVar_Event(t *testing.T) {
197197 select {
198198 case <- th .C :
199199 th .Timeout ()
200- case msg := <- rq2 .outCh :
200+ case msg := <- rq2 .OutCh :
201201 s := msg .Format ()
202202 after , found := strings .CutPrefix (s , "Set\t Jid.2\t =" )
203203 th .Equal (found , true )
@@ -214,13 +214,13 @@ func Test_JsVar_Event(t *testing.T) {
214214 select {
215215 case <- th .C :
216216 th .Timeout ()
217- case rq1 .inCh <- wsMsg {Jid : 1 , What : what .Set , Data : "=1" }:
217+ case rq1 .InCh <- wsMsg {Jid : 1 , What : what .Set , Data : "=1" }:
218218 }
219219
220220 select {
221221 case <- th .C :
222222 th .Timeout ()
223- case msg := <- rq1 .outCh :
223+ case msg := <- rq1 .OutCh :
224224 s := msg .Format ()
225225 if ! strings .Contains (s , "jq: expected" ) {
226226 th .Error (s )
@@ -230,7 +230,7 @@ func Test_JsVar_Event(t *testing.T) {
230230
231231func Test_JsVar_PanicsOnWrongType (t * testing.T ) {
232232 th := newTestHelper (t )
233- rq := newTestRequest ()
233+ rq := newTestRequest (t )
234234 defer rq .Close ()
235235 defer func () {
236236 if x := recover (); x == nil {
@@ -255,7 +255,7 @@ var _ JsVarMaker = &testJsVarMaker{}
255255func Test_JsVar_JsVarMaker (t * testing.T ) {
256256 nextJid = 0
257257 th := newTestHelper (t )
258- rq := newTestRequest ()
258+ rq := newTestRequest (t )
259259 defer rq .Close ()
260260 err := rq .JsVar ("foo" , & testJsVarMaker {})
261261 th .NoErr (err )
@@ -286,7 +286,7 @@ var _ SetPather = &testJsVarPathSetter{}
286286func Test_JsVar_PathSetter_SetPather (t * testing.T ) {
287287 nextJid = 0
288288 th := newTestHelper (t )
289- rq := newTestRequest ()
289+ rq := newTestRequest (t )
290290 defer rq .Close ()
291291
292292 var mu deadlock.Mutex
@@ -302,7 +302,7 @@ func Test_JsVar_PathSetter_SetPather(t *testing.T) {
302302func Test_JsVar_Unchanged (t * testing.T ) {
303303 nextJid = 0
304304 th := newTestHelper (t )
305- rq := newTestRequest ()
305+ rq := newTestRequest (t )
306306 defer rq .Close ()
307307
308308 var mu deadlock.Mutex
0 commit comments