Skip to content

Commit

Permalink
Adds testcase for andstor#160
Browse files Browse the repository at this point in the history
  • Loading branch information
joergi committed Mar 19, 2024
1 parent 25ef3af commit 8d34ad6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,19 @@ describe('Glob patterns', function () {
expect(res).to.equal(true)
})
})

describe('Use working dir', function () {
it('should return true for existing file when working_dir is true', async function() {
setEnv('working_dir', 'true')
setEnv('working_directory_path', 'test/')
const res = await checkExistence('resource/test.txt')
expect(res).to.equal(true)
})
it('should return true for existing file when working_ir is false', async function() {
setEnv('working_dir', 'false')
setEnv('working_directory_path', 'test/')
const res = await checkExistence('test/resource/test.txt')
expect(res).to.equal(true)
})
})

0 comments on commit 8d34ad6

Please sign in to comment.