@@ -3,7 +3,7 @@ import fetchMock from "fetch-mock";
33import { getComponent } from "../utils.js" ;
44import { send } from "../../../django_unicorn/static/unicorn/js/messageSender.js" ;
55
6- test . cb ( "call_method redirect" , ( t ) => {
6+ test ( "call_method redirect" , ( t ) => {
77 const html = `
88<input type="hidden" name="csrfmiddlewaretoken" value="asdf">
99<div unicorn:id="5jypjiyb" unicorn:name="text-inputs" unicorn:checksum="GXzew3Km">
@@ -38,7 +38,6 @@ test.cb("call_method redirect", (t) => {
3838 t . true ( err === null ) ;
3939 t . is ( component . window . location . href , "http://www.google.com" ) ;
4040 fetchMock . reset ( ) ;
41- t . end ( ) ;
4241 } ) ;
4342} ) ;
4443
@@ -127,7 +126,7 @@ test.cb("call_method hash", (t) => {
127126 } ) ;
128127} ) ;
129128
130- test . cb ( "call_method forceModelUpdate is true" , ( t ) => {
129+ test ( "call_method forceModelUpdate is true" , ( t ) => {
131130 const html = `
132131<input type="hidden" name="csrfmiddlewaretoken" value="asdf">
133132<div unicorn:id="5jypjiyb" unicorn:name="text-inputs" unicorn:checksum="GXzew3Km">
@@ -162,11 +161,10 @@ test.cb("call_method forceModelUpdate is true", (t) => {
162161 t . true ( err === null ) ;
163162 t . true ( forceModelUpdates ) ;
164163 fetchMock . reset ( ) ;
165- t . end ( ) ;
166164 } ) ;
167165} ) ;
168166
169- test . cb ( "call_method partial.id" , ( t ) => {
167+ test ( "call_method partial.id" , ( t ) => {
170168 // Annoyingly it appears that $('[unicorn\\:key='something']) doesn't
171169 // seem to work in JSDom, so this just tests targeting by id
172170 const html = `
@@ -214,11 +212,10 @@ test.cb("call_method partial.id", (t) => {
214212 t . is ( morphdomMergers . length , 1 ) ;
215213 t . is ( morphdomMergers [ 0 ] , "<span id='clicker-id'>id partial!</span>" ) ;
216214 fetchMock . reset ( ) ;
217- t . end ( ) ;
218215 } ) ;
219216} ) ;
220217
221- test . cb ( "call_method partial target" , ( t ) => {
218+ test ( "call_method partial target" , ( t ) => {
222219 // Annoyingly it appears that $('[unicorn\\:key='something']) doesn't
223220 // seem to work in JSDom, so this just tests targeting by id
224221 const html = `
@@ -265,6 +262,5 @@ test.cb("call_method partial target", (t) => {
265262 t . is ( morphdomMergers . length , 1 ) ;
266263 t . is ( morphdomMergers [ 0 ] , "<span id='clicker-id'>id partial!</span>" ) ;
267264 fetchMock . reset ( ) ;
268- t . end ( ) ;
269265 } ) ;
270266} ) ;
0 commit comments