@@ -14,9 +14,9 @@ describe('Action', () => {
1414 it ( 'works with create' , ( ) => {
1515 const actions = new ActionList ;
1616
17- actions . create ( normalize ( '/a/b' ) , new Buffer ( '1' ) ) ;
18- actions . create ( normalize ( '/a/c' ) , new Buffer ( '2' ) ) ;
19- actions . create ( normalize ( '/a/c' ) , new Buffer ( '3' ) ) ;
17+ actions . create ( normalize ( '/a/b' ) , Buffer . from ( '1' ) ) ;
18+ actions . create ( normalize ( '/a/c' ) , Buffer . from ( '2' ) ) ;
19+ actions . create ( normalize ( '/a/c' ) , Buffer . from ( '3' ) ) ;
2020
2121 expect ( actions . length ) . toBe ( 3 ) ;
2222 actions . optimize ( ) ;
@@ -25,10 +25,10 @@ describe('Action', () => {
2525 it ( 'works with overwrite' , ( ) => {
2626 const actions = new ActionList ;
2727
28- actions . create ( normalize ( '/a/b' ) , new Buffer ( '1' ) ) ;
29- actions . create ( normalize ( '/a/c' ) , new Buffer ( '2' ) ) ;
30- actions . overwrite ( normalize ( '/a/c' ) , new Buffer ( '3' ) ) ;
31- actions . overwrite ( normalize ( '/a/b' ) , new Buffer ( '4' ) ) ;
28+ actions . create ( normalize ( '/a/b' ) , Buffer . from ( '1' ) ) ;
29+ actions . create ( normalize ( '/a/c' ) , Buffer . from ( '2' ) ) ;
30+ actions . overwrite ( normalize ( '/a/c' ) , Buffer . from ( '3' ) ) ;
31+ actions . overwrite ( normalize ( '/a/b' ) , Buffer . from ( '4' ) ) ;
3232
3333 expect ( actions . length ) . toBe ( 4 ) ;
3434 actions . optimize ( ) ;
@@ -38,11 +38,11 @@ describe('Action', () => {
3838 it ( 'works with cloning a list' , ( ) => {
3939 const actions = new ActionList ;
4040
41- actions . create ( normalize ( '/a/b' ) , new Buffer ( '1' ) ) ;
42- actions . create ( normalize ( '/a/c' ) , new Buffer ( '2' ) ) ;
43- actions . overwrite ( normalize ( '/a/c' ) , new Buffer ( '3' ) ) ;
44- actions . overwrite ( normalize ( '/a/b' ) , new Buffer ( '4' ) ) ;
45- actions . create ( normalize ( '/a/d' ) , new Buffer ( '5' ) ) ;
41+ actions . create ( normalize ( '/a/b' ) , Buffer . from ( '1' ) ) ;
42+ actions . create ( normalize ( '/a/c' ) , Buffer . from ( '2' ) ) ;
43+ actions . overwrite ( normalize ( '/a/c' ) , Buffer . from ( '3' ) ) ;
44+ actions . overwrite ( normalize ( '/a/b' ) , Buffer . from ( '4' ) ) ;
45+ actions . create ( normalize ( '/a/d' ) , Buffer . from ( '5' ) ) ;
4646
4747 const actions2 = new ActionList ;
4848 actions . forEach ( x => actions2 . push ( x ) ) ;
@@ -59,10 +59,10 @@ describe('Action', () => {
5959 it ( 'handles edge cases (1)' , ( ) => {
6060 const actions = new ActionList ;
6161
62- actions . create ( normalize ( '/test' ) , new Buffer ( '1' ) ) ;
63- actions . overwrite ( normalize ( '/test' ) , new Buffer ( '3' ) ) ;
64- actions . overwrite ( normalize ( '/hello' ) , new Buffer ( '2' ) ) ;
65- actions . overwrite ( normalize ( '/test' ) , new Buffer ( '4' ) ) ;
62+ actions . create ( normalize ( '/test' ) , Buffer . from ( '1' ) ) ;
63+ actions . overwrite ( normalize ( '/test' ) , Buffer . from ( '3' ) ) ;
64+ actions . overwrite ( normalize ( '/hello' ) , Buffer . from ( '2' ) ) ;
65+ actions . overwrite ( normalize ( '/test' ) , Buffer . from ( '4' ) ) ;
6666
6767 const actions2 = new ActionList ;
6868 actions . forEach ( x => actions2 . push ( x ) ) ;
@@ -79,9 +79,9 @@ describe('Action', () => {
7979 it ( 'handles edge cases (2)' , ( ) => {
8080 const actions = new ActionList ;
8181
82- actions . create ( normalize ( '/test' ) , new Buffer ( '1' ) ) ;
82+ actions . create ( normalize ( '/test' ) , Buffer . from ( '1' ) ) ;
8383 actions . rename ( normalize ( '/test' ) , normalize ( '/test1' ) ) ;
84- actions . overwrite ( normalize ( '/test1' ) , new Buffer ( '2' ) ) ;
84+ actions . overwrite ( normalize ( '/test1' ) , Buffer . from ( '2' ) ) ;
8585 actions . rename ( normalize ( '/test1' ) , normalize ( '/test2' ) ) ;
8686
8787 actions . optimize ( ) ;
@@ -95,7 +95,7 @@ describe('Action', () => {
9595 const actions = new ActionList ;
9696
9797 actions . rename ( normalize ( '/test' ) , normalize ( '/test1' ) ) ;
98- actions . overwrite ( normalize ( '/test1' ) , new Buffer ( '2' ) ) ;
98+ actions . overwrite ( normalize ( '/test1' ) , Buffer . from ( '2' ) ) ;
9999 actions . rename ( normalize ( '/test1' ) , normalize ( '/test2' ) ) ;
100100
101101 actions . optimize ( ) ;
0 commit comments