@@ -7,28 +7,28 @@ const Helpers = require('test/helpers')
77test ( 'toDataURL - no promise available' , function ( t ) {
88 Helpers . removeNativePromise ( )
99
10- t . throw ( function ( ) { QRCode . toDataURL ( ) } ,
10+ t . throws ( function ( ) { QRCode . toDataURL ( ) } ,
1111 'Should throw if no arguments are provided' )
1212
13- t . throw ( function ( ) { QRCode . toDataURL ( function ( ) { } ) } ,
13+ t . throws ( function ( ) { QRCode . toDataURL ( function ( ) { } ) } ,
1414 'Should throw if text is not provided' )
1515
16- t . throw ( function ( ) { QRCode . toDataURL ( 'some text' ) } ,
16+ t . throws ( function ( ) { QRCode . toDataURL ( 'some text' ) } ,
1717 'Should throw if a callback is not provided' )
1818
19- t . throw ( function ( ) { QRCode . toDataURL ( 'some text' , { } ) } ,
19+ t . throws ( function ( ) { QRCode . toDataURL ( 'some text' , { } ) } ,
2020 'Should throw if a callback is not a function' )
2121
22- t . throw ( function ( ) { QRCodeBrowser . toDataURL ( ) } ,
22+ t . throws ( function ( ) { QRCodeBrowser . toDataURL ( ) } ,
2323 'Should throw if no arguments are provided (browser)' )
2424
25- t . throw ( function ( ) { QRCodeBrowser . toDataURL ( function ( ) { } ) } ,
25+ t . throws ( function ( ) { QRCodeBrowser . toDataURL ( function ( ) { } ) } ,
2626 'Should throw if text is not provided (browser)' )
2727
28- t . throw ( function ( ) { QRCodeBrowser . toDataURL ( 'some text' ) } ,
28+ t . throws ( function ( ) { QRCodeBrowser . toDataURL ( 'some text' ) } ,
2929 'Should throw if a callback is not provided (browser)' )
3030
31- t . throw ( function ( ) { QRCodeBrowser . toDataURL ( 'some text' , { } ) } ,
31+ t . throws ( function ( ) { QRCodeBrowser . toDataURL ( 'some text' , { } ) } ,
3232 'Should throw if a callback is not a function (browser)' )
3333
3434 t . end ( )
@@ -57,15 +57,15 @@ test('toDataURL - image/png', function (t) {
5757
5858 t . plan ( 8 )
5959
60- t . throw ( function ( ) { QRCode . toDataURL ( ) } ,
60+ t . throws ( function ( ) { QRCode . toDataURL ( ) } ,
6161 'Should throw if no arguments are provided' )
6262
6363 QRCode . toDataURL ( 'i am a pony!' , {
6464 errorCorrectionLevel : 'L' ,
6565 type : 'image/png'
6666 } , function ( err , url ) {
6767 t . ok ( ! err , 'there should be no error ' + err )
68- t . equals ( url , expectedDataURL ,
68+ t . equal ( url , expectedDataURL ,
6969 'url should match expected value for error correction L' )
7070 } )
7171
@@ -78,14 +78,14 @@ test('toDataURL - image/png', function (t) {
7878 t . notOk ( url , 'url should be null' )
7979 } )
8080
81- t . equals ( typeof QRCode . toDataURL ( 'i am a pony!' ) . then , 'function' ,
81+ t . equal ( typeof QRCode . toDataURL ( 'i am a pony!' ) . then , 'function' ,
8282 'Should return a promise' )
8383
8484 QRCode . toDataURL ( 'i am a pony!' , {
8585 errorCorrectionLevel : 'L' ,
8686 type : 'image/png'
8787 } ) . then ( function ( url ) {
88- t . equals ( url , expectedDataURL ,
88+ t . equal ( url , expectedDataURL ,
8989 'url should match expected value for error correction L (promise)' )
9090 } )
9191
@@ -120,10 +120,10 @@ test('Canvas toDataURL - image/png', function (t) {
120120
121121 t . plan ( 11 )
122122
123- t . throw ( function ( ) { QRCodeBrowser . toDataURL ( ) } ,
123+ t . throws ( function ( ) { QRCodeBrowser . toDataURL ( ) } ,
124124 'Should throw if no arguments are provided' )
125125
126- t . throw ( function ( ) { QRCodeBrowser . toDataURL ( function ( ) { } ) } ,
126+ t . throws ( function ( ) { QRCodeBrowser . toDataURL ( function ( ) { } ) } ,
127127 'Should throw if text is not provided' )
128128
129129 const canvas = createCanvas ( 200 , 200 )
@@ -132,7 +132,7 @@ test('Canvas toDataURL - image/png', function (t) {
132132 type : 'image/png'
133133 } , function ( err , url ) {
134134 t . ok ( ! err , 'there should be no error ' + err )
135- t . equals ( url , expectedDataURL , 'url generated should match expected value' )
135+ t . equal ( url , expectedDataURL , 'url generated should match expected value' )
136136 } )
137137
138138 QRCodeBrowser . toDataURL ( canvas , 'i am a pony!' , {
@@ -148,7 +148,7 @@ test('Canvas toDataURL - image/png', function (t) {
148148 errorCorrectionLevel : 'H' ,
149149 type : 'image/png'
150150 } ) . then ( function ( url ) {
151- t . equals ( url , expectedDataURL , 'url generated should match expected value (promise)' )
151+ t . equal ( url , expectedDataURL , 'url generated should match expected value (promise)' )
152152 } )
153153
154154 QRCodeBrowser . toDataURL ( canvas , 'i am a pony!' , {
@@ -173,13 +173,13 @@ test('Canvas toDataURL - image/png', function (t) {
173173 type : 'image/png'
174174 } , function ( err , url ) {
175175 t . ok ( ! err , 'there should be no error ' + err )
176- t . equals ( url , expectedDataURL , 'url generated should match expected value' )
176+ t . equal ( url , expectedDataURL , 'url generated should match expected value' )
177177 } )
178178
179179 QRCodeBrowser . toDataURL ( 'i am a pony!' , {
180180 errorCorrectionLevel : 'H' ,
181181 type : 'image/png'
182182 } ) . then ( function ( url ) {
183- t . equals ( url , expectedDataURL , 'url generated should match expected value (promise)' )
183+ t . equal ( url , expectedDataURL , 'url generated should match expected value (promise)' )
184184 } )
185185} )
0 commit comments