Skip to content

Commit

Permalink
removed sleeps
Browse files Browse the repository at this point in the history
  • Loading branch information
SPRINX0\prochazka committed Feb 19, 2025
1 parent 2890c0b commit 82cf08f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/diflow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Git Repository Tests', () => {
test('Adding new files', async () => {
console.log('BEGIN TEST: Adding new files');

await sleep(2000);
// await sleep(2000);

// Add new file in diff repo
await createTestCommit(getTestRepoPath('diff'), 'newfile.txt', 'new content', 'diff');
Expand Down Expand Up @@ -41,7 +41,7 @@ describe('Git Repository Tests', () => {
test('Removing files', async () => {
console.log('BEGIN TEST: Remove files');

await sleep(2000);
// await sleep(2000);
// Remove file in diff repo
await fs.unlink(path.join(getTestRepoPath('diff'), 'file1.txt'));
await execAsync('git add .', { cwd: getTestRepoPath('diff') });
Expand Down Expand Up @@ -71,7 +71,7 @@ describe('Git Repository Tests', () => {
test('Changing files', async () => {
console.log('BEGIN TEST: Changing files');

await sleep(2000);
// await sleep(2000);

// Modify file in diff repo
await fs.writeFile(path.join(getTestRepoPath('diff'), 'file1.txt'), 'modified content');
Expand Down
2 changes: 1 addition & 1 deletion src/testrepo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ export async function afterDiflow() {
await execAsync('git checkout master', { cwd: getTestRepoPath('merged') });
await execAsync('git checkout master', { cwd: getTestRepoPath('base') });
await execAsync('git checkout master', { cwd: getTestRepoPath('diff') });
await sleep(1000);
// await sleep(1000);
console.log('Checked out master branch')
}
2 changes: 1 addition & 1 deletion src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function runGitCommand(repoPath: string, cmd: string): Promise<stri
}

export async function getCommits(repoPath: string, branch: string): Promise<Commit[]> {
const log = await runGitCommand(repoPath, `log ${branch} --pretty=format:"%H|%ct"`);
const log = await runGitCommand(repoPath, `log ${branch} --reverse --pretty=format:"%H|%ct"`);
const res = log
.split('\n')
.filter(Boolean)
Expand Down

0 comments on commit 82cf08f

Please sign in to comment.