Skip to content

Commit 357036c

Browse files
committed
wip
1 parent 1812250 commit 357036c

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

tests/lib/Repository.test.ts

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,37 @@ it('sets properties correctly on create', async () => {
2525
expect(repository).toMatchSnapshot();
2626
});
2727

28-
it('gets the current branch names', async () => {
29-
const repository = new Repository('permafrost-dev/codeboost', tempPath);
30-
repository.path = `${__dirname}/../..`;
28+
if (typeof process.env.CI === 'undefined') {
29+
it('gets the current branch names', async () => {
30+
const repository = new Repository('permafrost-dev/codeboost', tempPath);
31+
repository.path = `${__dirname}/../..`;
3132

32-
const mainBranchName = 'main';
33-
const branch = await repository.currentBranch();
33+
const mainBranchName = 'main';
34+
const branch = await repository.currentBranch();
3435

35-
expect(branch).toBe(mainBranchName);
36-
});
36+
expect(branch).toBe(mainBranchName);
37+
});
3738

38-
it('gets a list of local branches', async () => {
39-
const repository = new Repository('permafrost-dev/codeboost', tempPath);
40-
repository.path = `${__dirname}/../..`;
39+
it('gets a list of local branches', async () => {
40+
const repository = new Repository('permafrost-dev/codeboost', tempPath);
41+
repository.path = `${__dirname}/../..`;
4142

42-
const mainBranchName = 'main';
43-
const branches = await repository.localBranches();
43+
const mainBranchName = 'main';
44+
const branches = await repository.localBranches();
4445

45-
expect(branches.all).toContain(mainBranchName);
46-
});
46+
expect(branches.all).toContain(mainBranchName);
47+
});
4748

48-
it('checks if it is on a branch', async () => {
49-
const repository = new Repository('permafrost-dev/codeboost', tempPath);
50-
repository.path = `${__dirname}/../..`;
49+
it('checks if it is on a branch', async () => {
50+
const repository = new Repository('permafrost-dev/codeboost', tempPath);
51+
repository.path = `${__dirname}/../..`;
5152

52-
const mainBranchName = 'main';
53-
const isOnBranch = await repository.onBranch(mainBranchName);
53+
const mainBranchName = 'main';
54+
const isOnBranch = await repository.onBranch(mainBranchName);
5455

55-
expect(isOnBranch).toBeTruthy();
56-
});
56+
expect(isOnBranch).toBeTruthy();
57+
});
58+
}
5759

5860
if (typeof process.env.CI !== 'undefined') {
5961
it('checks out a new branch', async () => {

0 commit comments

Comments
 (0)