Skip to content

Commit 64b4260

Browse files
committed
[HASH]: refactor and closes issue #4
Signed-off-by: ashish <[email protected]>
1 parent f390fb3 commit 64b4260

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

test/commands/hash.test.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,20 @@ describe('hash', () => {
8383
expect(ctx.stdout).to.contain('a85a72b0a240abecdf27f127aa75fd8663d6d5be')
8484
})
8585

86-
//file input - file not found TODO: solve issue #4
87-
test
88-
.stdout()
89-
.command(['hash', '-f', 'test/resources/filenotfound.txt'])
90-
.exit(0)
91-
.it("cdt hash -f 'test/resources/filenotfound.txt'", ctx => {
92-
expect(ctx.stdout).to.contain('Could not find file')
93-
})
94-
9586
//file input
9687
test
9788
.stdout()
9889
.command(['hash', '-f', 'test/resources/test.txt'])
99-
.it("cdt hash -f 'test/resources/test.txt'", ctx => {
90+
.it("File Hashing -> cdt hash -f 'test/resources/test.txt'", ctx => {
10091
expect(ctx.stdout).to.contain('97ee6255ffc855e79e2324d5495b6538e29034f9')
10192
})
10293

94+
//file input - file not found
95+
test
96+
.stdout()
97+
.command(['hash', '-f', 'test/resources/filenotfound.txt'])
98+
.exit(0)
99+
.it("If File not found ->cdt hash -f 'test/resources/filenotfound.txt'", ctx => {
100+
expect(ctx.stdout).to.contain('Could not find file')
101+
})
103102
})

0 commit comments

Comments
 (0)