@@ -6,6 +6,7 @@ import fc from 'fast-check';
66import { Action } from '../../src/proxy/actions' ;
77import { exec } from '../../src/proxy/processors/push-action/getDiff' ;
88import { CommitData } from '../../src/proxy/processors/types' ;
9+ import { EMPTY_COMMIT_HASH } from '../../src/proxy/processors/constants' ;
910
1011describe ( 'getDiff' , ( ) => {
1112 let tempDir : string ;
@@ -40,7 +41,7 @@ describe('getDiff', () => {
4041 action . repoName = 'temp-test-repo' ;
4142 action . commitFrom = 'HEAD~1' ;
4243 action . commitTo = 'HEAD' ;
43- action . commitData = [ { parent : '0000000000000000000000000000000000000000' } as CommitData ] ;
44+ action . commitData = [ { parent : EMPTY_COMMIT_HASH } as CommitData ] ;
4445
4546 const result = await exec ( { } , action ) ;
4647
@@ -55,7 +56,7 @@ describe('getDiff', () => {
5556 action . repoName = 'temp-test-repo' ;
5657 action . commitFrom = 'HEAD~1' ;
5758 action . commitTo = 'HEAD' ;
58- action . commitData = [ { parent : '0000000000000000000000000000000000000000' } as CommitData ] ;
59+ action . commitData = [ { parent : EMPTY_COMMIT_HASH } as CommitData ] ;
5960
6061 const result = await exec ( { } , action ) ;
6162
@@ -106,7 +107,7 @@ describe('getDiff', () => {
106107
107108 action . proxyGitPath = path . dirname ( tempDir ) ;
108109 action . repoName = path . basename ( tempDir ) ;
109- action . commitFrom = '0000000000000000000000000000000000000000' ;
110+ action . commitFrom = EMPTY_COMMIT_HASH ;
110111 action . commitTo = headCommit ;
111112 action . commitData = [ { parent : parentCommit } as CommitData ] ;
112113
@@ -156,9 +157,7 @@ describe('getDiff', () => {
156157 action . repoName = 'temp-test-repo' ;
157158 action . commitFrom = from ;
158159 action . commitTo = to ;
159- action . commitData = [
160- { parent : '0000000000000000000000000000000000000000' } as CommitData ,
161- ] ;
160+ action . commitData = [ { parent : EMPTY_COMMIT_HASH } as CommitData ] ;
162161
163162 const result = await exec ( { } , action ) ;
164163
0 commit comments