test: clarify variables name

This commit is contained in:
Pierre Vanduynslager 2018-11-21 12:12:42 -05:00
parent f2ede5bdde
commit aa022e0ac2

View File

@ -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 => {