1+ var assert = require ( 'node:assert' ) ;
2+ var { describe, it } = require ( 'node:test' ) ;
13var rework = require ( '..' ) ;
24
35describe ( 'rework' , function ( ) {
@@ -7,19 +9,20 @@ describe('rework', function() {
79 var r = rework ( 'body { color: red; }' ) ;
810 var called = false ;
911 var result = r . use ( function ( sheet , instance ) {
10- sheet . should . have . property ( 'rules' ) ;
11- instance . should . equal ( r ) ;
12+ assert . ok ( 'rules' in sheet ) ;
13+ assert . strictEqual ( instance , r ) ;
1214 } ) ;
1315
14- result . should . equal ( r ) ;
16+ assert . strictEqual ( result , r ) ;
1517 } ) ;
1618 } ) ;
1719
1820 describe ( '.toString() compress option' , function ( ) {
1921 it ( 'should compress the output' , function ( ) {
20- rework ( 'body { color: red; }' )
21- . toString ( { compress : true } )
22- . should . equal ( 'body{color:red;}' ) ;
22+ assert . strictEqual (
23+ rework ( 'body { color: red; }' ) . toString ( { compress : true } ) ,
24+ 'body{color:red;}'
25+ ) ;
2326 } ) ;
2427 } ) ;
2528
@@ -30,7 +33,8 @@ describe('rework', function() {
3033 sourcemap : true
3134 } ) ;
3235
33- result . should . equal (
36+ assert . strictEqual (
37+ result ,
3438 'body{color:red;}' + '\n' +
3539 '/*# sourceMappingURL=data:application/json;base64,' +
3640 'eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS5jc3MiXSwibmFtZXMiOltdL' +
@@ -48,9 +52,9 @@ describe('rework', function() {
4852 sourcemapAsObject : true
4953 } ) ;
5054
51- result . code . should . equal ( 'body{color:red;}' ) ;
52- result . map . should . have . property ( 'mappings' ) ;
53- result . map . mappings . should . equal ( 'AAAA,KAAO' ) ;
55+ assert . strictEqual ( result . code , 'body{color:red;}' ) ;
56+ assert . ok ( 'mappings' in result . map ) ;
57+ assert . strictEqual ( result . map . mappings , 'AAAA,KAAO' ) ;
5458 } ) ;
5559 } ) ;
5660
0 commit comments