1- var expect = chai . expect ;
1+ const expect = chai . expect ;
22
33describe ( 'p5.EQ' , function ( ) {
44 it ( 'can be created and disposed' , function ( ) {
5- var origSoundArrayLength = p5 . soundOut . soundArray . length ;
6- var eq = new p5 . EQ ( ) ;
5+ const origSoundArrayLength = p5 . soundOut . soundArray . length ;
6+ const eq = new p5 . EQ ( ) ;
77 expect ( p5 . soundOut . soundArray . length ) . to . not . equal ( origSoundArrayLength ) ;
88 eq . dispose ( ) ;
99 expect ( p5 . soundOut . soundArray . length ) . to . equal ( origSoundArrayLength ) ;
@@ -13,7 +13,7 @@ describe('p5.EQ', function () {
1313 } ) ;
1414
1515 it ( 'can be only be created with size 3 or 8' , function ( ) {
16- var eq = new p5 . EQ ( ) ;
16+ let eq = new p5 . EQ ( ) ;
1717 expect ( eq . bands . length ) . to . equal ( 3 ) ;
1818 eq . dispose ( ) ;
1919 eq = new p5 . EQ ( 3 ) ;
@@ -28,7 +28,7 @@ describe('p5.EQ', function () {
2828 } ) ;
2929
3030 it ( 'a band can be toggled on and off' , function ( ) {
31- var eq = new p5 . EQ ( 8 ) ;
31+ const eq = new p5 . EQ ( 8 ) ;
3232 expect ( eq . bands [ 2 ] . biquad . type ) . to . equal ( 'peaking' ) ;
3333 eq . bands [ 2 ] . toggle ( ) ;
3434 expect ( eq . bands [ 2 ] . biquad . type ) . to . equal ( 'allpass' ) ;
@@ -37,29 +37,29 @@ describe('p5.EQ', function () {
3737 } ) ;
3838
3939 it ( 'a bands gain value can be changed' , function ( ) {
40- var eq = new p5 . EQ ( 8 ) ;
40+ const eq = new p5 . EQ ( 8 ) ;
4141 expect ( eq . bands [ 2 ] . gain ( ) ) . to . equal ( 0 ) ;
4242 eq . bands [ 2 ] . gain ( 30 ) ;
4343 expect ( eq . bands [ 2 ] . gain ( ) ) . to . equal ( 30 ) ;
4444 } ) ;
4545
4646 it ( 'a bands freq value can be changed' , function ( ) {
47- var eq = new p5 . EQ ( 8 ) ;
47+ const eq = new p5 . EQ ( 8 ) ;
4848 expect ( eq . bands [ 0 ] . freq ( ) ) . to . equal ( 100 ) ;
4949 eq . bands [ 0 ] . freq ( 200 ) ;
5050 expect ( eq . bands [ 0 ] . gain ( ) ) . to . equal ( 0 ) ;
5151 expect ( eq . bands [ 0 ] . freq ( ) ) . to . equal ( 200 ) ;
5252 } ) ;
5353
5454 it ( 'a bands type can be changed' , function ( ) {
55- var eq = new p5 . EQ ( ) ;
55+ const eq = new p5 . EQ ( ) ;
5656 expect ( eq . bands [ 2 ] . _untoggledType ) . to . equal ( 'peaking' ) ;
5757 eq . bands [ 2 ] . setType ( 'highshelf' ) ;
5858 expect ( eq . bands [ 2 ] . _untoggledType ) . to . equal ( 'highshelf' ) ;
5959 } ) ;
6060
6161 it ( 'drywet value can be changed' , function ( ) {
62- var eq = new p5 . EQ ( ) ;
62+ const eq = new p5 . EQ ( ) ;
6363 expect ( eq . drywet ( 0.5 ) ) . to . equal ( 0.5 ) ;
6464 } ) ;
6565} ) ;
0 commit comments