11const TemperamentWidget = require ( "../temperament" ) ;
22describe ( "TemperamentWidget basic tests" , ( ) => {
33 let widget ;
4- global . _ = jest . fn ( ( text ) => text ) ;
4+ global . _ = jest . fn ( text => text ) ;
55
66 beforeEach ( ( ) => {
77 document . body . innerHTML = `
@@ -10,7 +10,7 @@ describe("TemperamentWidget basic tests", () => {
1010 <div id="userEdit"></div>
1111 ` ;
1212
13- global . _ = jest . fn ( ( text ) => text ) ;
13+ global . _ = jest . fn ( text => text ) ;
1414
1515 global . wheelnav = jest . fn ( ) . mockImplementation ( ( ) => ( {
1616 wheelRadius : 0 ,
@@ -45,7 +45,7 @@ describe("TemperamentWidget basic tests", () => {
4545 DonutSliceCustomization : ( ) => ( { } )
4646 } ) ) ;
4747
48- global . docById = jest . fn ( ( id ) => ( {
48+ global . docById = jest . fn ( id => ( {
4949 innerHTML : "" ,
5050 style : { } ,
5151 append : jest . fn ( ) ,
@@ -68,8 +68,8 @@ describe("TemperamentWidget basic tests", () => {
6868 widget . _logo = {
6969 resetSynth : jest . fn ( ) ,
7070 synth : {
71- trigger : jest . fn ( ) ,
72- } ,
71+ trigger : jest . fn ( )
72+ }
7373 } ;
7474
7575 widget . frequencies = [ 440 ] ;
@@ -151,7 +151,7 @@ describe("TemperamentWidget basic tests", () => {
151151 widget . tempRatios1 = [ 2 ] ;
152152 widget . frequencies = [ 440 ] ;
153153
154- global . docById = jest . fn ( ( id ) => {
154+ global . docById = jest . fn ( id => {
155155 if ( id === "wheelDiv4" ) return null ;
156156 return { style : { } } ;
157157 } ) ;
@@ -205,7 +205,7 @@ describe("TemperamentWidget basic tests", () => {
205205 global . docById = jest . fn ( ( ) => ( {
206206 innerHTML : "" ,
207207 style : { } ,
208- append : jest . fn ( ) ,
208+ append : jest . fn ( )
209209 } ) ) ;
210210 document . querySelectorAll = jest . fn ( ( ) => [
211211 { style : { } } ,
@@ -244,7 +244,7 @@ describe("TemperamentWidget basic tests", () => {
244244 } ) ;
245245
246246 test ( "arbitraryEdit sets editMode to arbitrary" , ( ) => {
247- global . docById = jest . fn ( ( id ) => {
247+ global . docById = jest . fn ( id => {
248248 if ( id === "circ1" ) {
249249 return {
250250 style : { } ,
@@ -266,7 +266,7 @@ describe("TemperamentWidget basic tests", () => {
266266 innerHTML : "" ,
267267 style : { } ,
268268 append : jest . fn ( ) ,
269- addEventListener : jest . fn ( ) // 👈 ADD THIS
269+ addEventListener : jest . fn ( ) // 👈 ADD THIS
270270 } ;
271271 } ) ;
272272
@@ -338,7 +338,10 @@ describe("TemperamentWidget basic tests", () => {
338338 widget . ratios = [ 1 , 2 ] ;
339339 widget . frequencies = [ 440 , 880 ] ;
340340 widget . intervals = [ "0" , "1" ] ;
341- widget . notes = [ [ "C" , 4 ] , [ "C" , 5 ] ] ;
341+ widget . notes = [
342+ [ "C" , 4 ] ,
343+ [ "C" , 5 ]
344+ ] ;
342345 widget . scaleNotes = [ "C" ] ;
343346 widget . circleIsVisible = false ;
344347
@@ -375,7 +378,7 @@ describe("TemperamentWidget basic tests", () => {
375378 widget . tempRatios1 = [ 1 ] ;
376379 widget . tempRatios = [ 1 ] ;
377380
378- global . docById = jest . fn ( ( id ) => {
381+ global . docById = jest . fn ( id => {
379382 if ( id === "frequencySlider" ) {
380383 return { value : 880 } ;
381384 }
@@ -410,7 +413,7 @@ describe("TemperamentWidget basic tests", () => {
410413 textMsg : jest . fn ( )
411414 } ;
412415
413- global . docById = jest . fn ( ( id ) => {
416+ global . docById = jest . fn ( id => {
414417 if ( id === "startNote" ) return { value : 3 } ;
415418 if ( id === "endNote" ) return { value : 1 } ;
416419 return {
@@ -465,7 +468,7 @@ describe("TemperamentWidget basic tests", () => {
465468 synth : {
466469 stop : jest . fn ( ) ,
467470 setMasterVolume : jest . fn ( ) ,
468- startingPitch : "C4" // 👈 REQUIRED
471+ startingPitch : "C4" // 👈 REQUIRED
469472 }
470473 } ;
471474
@@ -485,7 +488,10 @@ describe("TemperamentWidget basic tests", () => {
485488
486489 widget . inTemperament = "equal" ;
487490 widget . ratios = [ 1 , 2 ] ;
488- widget . notes = [ [ "C" , 4 ] , [ "C" , 5 ] ] ;
491+ widget . notes = [
492+ [ "C" , 4 ] ,
493+ [ "C" , 5 ]
494+ ] ;
489495 widget . powerBase = 2 ;
490496
491497 widget . _logo = {
0 commit comments