File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 11import { expect , test } from "vitest" ;
2- import { splitMultiFilePatch } from "$lib/util" ;
2+ import { splitMultiFilePatch } from "$lib/util" ;
33import * as path from "node:path" ;
44import * as fs from "node:fs" ;
55
66test ( "Yield 2 patches from a patch file with signature" , ( ) => {
7- const patch = loadPatch ( ' patch-with-signature.patch' ) ;
7+ const patch = loadPatch ( " patch-with-signature.patch" ) ;
88 expect ( splitMultiFilePatch ( patch ) . length ) . toBe ( 2 ) ;
99} ) ;
1010
11-
1211test ( "Yield 2 patches from a patch file without signature" , ( ) => {
13- const patch = loadPatch ( ' patch-without-signature.patch' ) ;
12+ const patch = loadPatch ( " patch-without-signature.patch" ) ;
1413 expect ( splitMultiFilePatch ( patch ) . length ) . toBe ( 2 ) ;
1514} ) ;
1615
17-
1816export function loadPatch ( name : string ) : string {
1917 const filePath = path . resolve ( __dirname , "patches" , name ) ;
2018
21- return fs . readFileSync (
22- filePath ,
23- 'utf8'
24- ) ;
19+ return fs . readFileSync ( filePath , "utf8" ) ;
2520}
You can’t perform that action at this time.
0 commit comments