test: clarify variables name
This commit is contained in:
parent
f2ede5bdde
commit
aa022e0ac2
@ -204,19 +204,18 @@ test('Return "true" if repository is up to date', async t => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('Return falsy if repository is not up to date', async t => {
|
test('Return falsy if repository is not up to date', async t => {
|
||||||
let {cwd, repositoryUrl} = await gitRepo(true);
|
const {cwd, repositoryUrl} = await gitRepo(true);
|
||||||
const repoDir = cwd;
|
|
||||||
await gitCommits(['First'], {cwd});
|
await gitCommits(['First'], {cwd});
|
||||||
await gitCommits(['Second'], {cwd});
|
await gitCommits(['Second'], {cwd});
|
||||||
await gitPush(repositoryUrl, 'master', {cwd});
|
await gitPush(repositoryUrl, 'master', {cwd});
|
||||||
|
|
||||||
t.true(await isBranchUpToDate('master', {cwd}));
|
t.true(await isBranchUpToDate('master', {cwd}));
|
||||||
|
|
||||||
cwd = await gitShallowClone(repositoryUrl);
|
const tmpRepo = await gitShallowClone(repositoryUrl);
|
||||||
await gitCommits(['Third'], {cwd});
|
await gitCommits(['Third'], {cwd: tmpRepo});
|
||||||
await gitPush('origin', 'master', {cwd});
|
await gitPush('origin', 'master', {cwd: tmpRepo});
|
||||||
|
|
||||||
t.falsy(await isBranchUpToDate('master', {cwd: repoDir}));
|
t.falsy(await isBranchUpToDate('master', {cwd}));
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Return "true" if local repository is ahead', async t => {
|
test('Return "true" if local repository is ahead', async t => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user