@@ -4,7 +4,7 @@ import fs from 'node:fs'
44import path from 'node:path'
55import { promisify } from 'node:util'
66import test from 'tape'
7- import { toVFile } from 'to-vfile'
7+ import { toVFile , write } from 'to-vfile'
88import rimraf from 'rimraf'
99import { processor } from './processor.js'
1010
@@ -69,15 +69,15 @@ test('diff() (travis)', async (t) => {
6969 'should set messages'
7070 )
7171
72- await toVFile . write ( fileOne )
72+ await write ( fileOne )
7373
7474 await exec ( 'git add example.txt' )
7575 await exec ( 'git commit -m one' )
7676 const resultInitial = await exec ( 'git rev-parse HEAD' )
7777 const initial = resultInitial . stdout . trim ( )
7878
7979 // Change files.
80- await toVFile . write ( { path : 'example.txt' , value : stepTwo } )
80+ await write ( { path : 'example.txt' , value : stepTwo } )
8181 await exec ( 'git add example.txt' )
8282 await exec ( 'git commit -m two' )
8383 const resultFinal = await exec ( 'git rev-parse HEAD' )
@@ -117,8 +117,8 @@ test('diff() (travis)', async (t) => {
117117 )
118118
119119 // New file.
120- await toVFile . write ( { path : 'example.txt' , value : stepThree } )
121- await toVFile . write ( { path : 'new.txt' , value : other } )
120+ await write ( { path : 'example.txt' , value : stepThree } )
121+ await write ( { path : 'new.txt' , value : other } )
122122 await exec ( 'git add example.txt new.txt' )
123123 await exec ( 'git commit -m three' )
124124 const resultNew = await exec ( 'git rev-parse HEAD' )
@@ -168,12 +168,12 @@ test('diff() (GitHub Actions)', async (t) => {
168168
169169 await exec ( 'git init' )
170170 // Add initial file.
171- await toVFile . write ( { path : 'example.txt' , value : stepOne } )
171+ await write ( { path : 'example.txt' , value : stepOne } )
172172 await exec ( 'git add example.txt' )
173173 await exec ( 'git commit -m one' )
174174
175175 // Change file.
176- await toVFile . write ( { path : 'example.txt' , value : stepTwo } )
176+ await write ( { path : 'example.txt' , value : stepTwo } )
177177 await exec ( 'git add example.txt' )
178178 await exec ( 'git commit -m two' )
179179 const resultInitial = await exec ( 'git rev-parse HEAD' )
@@ -197,10 +197,10 @@ test('diff() (GitHub Actions)', async (t) => {
197197 await exec ( 'git checkout -b other-branch' )
198198
199199 // Change file.
200- await toVFile . write ( { path : 'example.txt' , value : stepThree } )
200+ await write ( { path : 'example.txt' , value : stepThree } )
201201 await exec ( 'git add example.txt' )
202202 await exec ( 'git commit -m three' )
203- await toVFile . write ( { path : 'example.txt' , value : stepFour } )
203+ await write ( { path : 'example.txt' , value : stepFour } )
204204 await exec ( 'git add example.txt' )
205205 await exec ( 'git commit -m four' )
206206 const final = await exec ( 'git rev-parse HEAD' )
0 commit comments