11import assert from "assert" ;
22import fs from "fs" ;
3- import yaml from "yaml" ;
43import path from "path" ;
54import os from "os" ;
65const importIndex = import ( "@apphosting/common/dist/index.js" ) ;
@@ -12,17 +11,17 @@ describe("update or create .gitignore", () => {
1211 } ) ;
1312
1413 it ( ".gitignore file exists and is correctly updated with missing paths" , async ( ) => {
15- const { UpdateOrCreateGitignore } = await importIndex ;
14+ const { updateOrCreateGitignore } = await importIndex ;
1615 fs . writeFileSync ( path . join ( tmpDir , ".gitignore" ) , "existingpath/" ) ;
1716
18- UpdateOrCreateGitignore ( tmpDir , [ "existingpath/" , "newpath/" ] ) ;
17+ updateOrCreateGitignore ( tmpDir , [ "existingpath/" , "newpath/" ] ) ;
1918
2019 const gitignoreContent = fs . readFileSync ( path . join ( tmpDir , ".gitignore" ) , "utf-8" ) ;
2120 assert . equal ( `existingpath/\nnewpath/\n` , gitignoreContent ) ;
2221 } ) ;
2322 it ( ".gitignore file does not exist and is created" , async ( ) => {
24- const { UpdateOrCreateGitignore } = await importIndex ;
25- UpdateOrCreateGitignore ( tmpDir , [ "chickenpath/" , "newpath/" ] ) ;
23+ const { updateOrCreateGitignore } = await importIndex ;
24+ updateOrCreateGitignore ( tmpDir , [ "chickenpath/" , "newpath/" ] ) ;
2625 const gitignoreContent = fs . readFileSync ( path . join ( tmpDir , ".gitignore" ) , "utf-8" ) ;
2726 assert . equal ( `chickenpath/\nnewpath/` , gitignoreContent ) ;
2827 } ) ;
0 commit comments