@@ -41,7 +41,7 @@ it('should transform css with multiple processors', function (cb) {
41
41
} )
42
42
43
43
stream . write ( new Vinyl ( {
44
- contents : new Buffer ( 'a { color: black }' )
44
+ contents : Buffer . from ( 'a { color: black }' )
45
45
} ) )
46
46
47
47
stream . end ( )
@@ -64,7 +64,7 @@ it('should not transform css with out any processor', function (cb) {
64
64
} )
65
65
66
66
stream . write ( new Vinyl ( {
67
- contents : new Buffer ( css )
67
+ contents : Buffer . from ( css )
68
68
} ) )
69
69
70
70
stream . end ( )
@@ -89,7 +89,7 @@ it('should correctly wrap postcss errors', function (cb) {
89
89
} )
90
90
91
91
stream . write ( new Vinyl ( {
92
- contents : new Buffer ( 'a {' ) ,
92
+ contents : Buffer . from ( 'a {' ) ,
93
93
path : path . resolve ( 'testpath' )
94
94
} ) )
95
95
@@ -143,7 +143,7 @@ it('should generate source maps', function (cb) {
143
143
init . write ( new Vinyl ( {
144
144
base : __dirname ,
145
145
path : __dirname + '/fixture.css' ,
146
- contents : new Buffer ( 'a { color: black }' )
146
+ contents : Buffer . from ( 'a { color: black }' )
147
147
} ) )
148
148
149
149
init . end ( )
@@ -169,7 +169,7 @@ it('should correctly generate relative source map', function (cb) {
169
169
init . write ( new Vinyl ( {
170
170
base : __dirname + '/src' ,
171
171
path : __dirname + '/src/fixture.css' ,
172
- contents : new Buffer ( 'a { color: black }' )
172
+ contents : Buffer . from ( 'a { color: black }' )
173
173
} ) )
174
174
175
175
init . end ( )
@@ -179,7 +179,7 @@ it('should correctly generate relative source map', function (cb) {
179
179
180
180
describe ( 'PostCSS Guidelines' , function ( ) {
181
181
182
- var sandbox = sinon . sandbox . create ( )
182
+ var sandbox = sinon . createSandbox ( )
183
183
var CssSyntaxError = function ( message , source ) {
184
184
this . name = 'CssSyntaxError'
185
185
this . message = message
@@ -241,7 +241,7 @@ describe('PostCSS Guidelines', function () {
241
241
} )
242
242
243
243
stream . write ( new Vinyl ( {
244
- contents : new Buffer ( 'a {}' ) ,
244
+ contents : Buffer . from ( 'a {}' ) ,
245
245
path : cssPath
246
246
} ) )
247
247
@@ -265,7 +265,7 @@ describe('PostCSS Guidelines', function () {
265
265
} )
266
266
267
267
stream . write ( new Vinyl ( {
268
- contents : new Buffer ( 'a {}' )
268
+ contents : Buffer . from ( 'a {}' )
269
269
} ) )
270
270
271
271
stream . end ( )
@@ -276,7 +276,7 @@ describe('PostCSS Guidelines', function () {
276
276
277
277
var cssPath = __dirname + '/fixture.css'
278
278
var file = new Vinyl ( {
279
- contents : new Buffer ( 'a {}' ) ,
279
+ contents : Buffer . from ( 'a {}' ) ,
280
280
path : cssPath
281
281
} )
282
282
var plugins = [ doubler ]
@@ -308,7 +308,7 @@ describe('PostCSS Guidelines', function () {
308
308
309
309
var cssPath = __dirname + '/fixture.css'
310
310
var file = new Vinyl ( {
311
- contents : new Buffer ( 'a {}' ) ,
311
+ contents : Buffer . from ( 'a {}' ) ,
312
312
path : cssPath
313
313
} )
314
314
var stream = postcss ( { to : 'initial' } )
@@ -355,7 +355,7 @@ describe('PostCSS Guidelines', function () {
355
355
cb ( )
356
356
} )
357
357
stream . end ( new Vinyl ( {
358
- contents : new Buffer ( 'a {}' ) ,
358
+ contents : Buffer . from ( 'a {}' ) ,
359
359
path : cssPath
360
360
} ) )
361
361
} )
@@ -375,7 +375,7 @@ describe('PostCSS Guidelines', function () {
375
375
cb ( )
376
376
} )
377
377
stream . end ( new Vinyl ( {
378
- contents : new Buffer ( 'a {}' ) ,
378
+ contents : Buffer . from ( 'a {}' ) ,
379
379
path : cssPath
380
380
} ) )
381
381
} )
@@ -395,7 +395,7 @@ describe('PostCSS Guidelines', function () {
395
395
cb ( )
396
396
} )
397
397
stream . end ( new Vinyl ( {
398
- contents : new Buffer ( 'a {}' ) ,
398
+ contents : Buffer . from ( 'a {}' ) ,
399
399
path : cssPath ,
400
400
base : __dirname
401
401
} ) )
@@ -432,7 +432,7 @@ describe('PostCSS Guidelines', function () {
432
432
} )
433
433
434
434
var file = new Vinyl ( {
435
- contents : new Buffer ( 'a {}' ) ,
435
+ contents : Buffer . from ( 'a {}' ) ,
436
436
path : cssPath
437
437
} )
438
438
file . sourceMap = { }
@@ -453,7 +453,7 @@ describe('PostCSS Guidelines', function () {
453
453
} )
454
454
455
455
stream . write ( new Vinyl ( {
456
- contents : new Buffer ( 'a {}' )
456
+ contents : Buffer . from ( 'a {}' )
457
457
} ) )
458
458
459
459
stream . end ( )
@@ -485,7 +485,7 @@ describe('PostCSS Guidelines', function () {
485
485
} )
486
486
487
487
stream . write ( new Vinyl ( {
488
- contents : new Buffer ( 'a {}' ) ,
488
+ contents : Buffer . from ( 'a {}' ) ,
489
489
path : cssPath
490
490
} ) )
491
491
@@ -520,7 +520,7 @@ describe('PostCSS Guidelines', function () {
520
520
} )
521
521
522
522
stream . write ( new Vinyl ( {
523
- contents : new Buffer ( 'a {}' ) ,
523
+ contents : Buffer . from ( 'a {}' ) ,
524
524
path : cssPath
525
525
} ) )
526
526
0 commit comments