From aa022e0ac228d476c9aca0255feba845a4fef92e Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Wed, 21 Nov 2018 12:12:42 -0500 Subject: [PATCH] test: clarify variables name --- test/git.test.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/git.test.js b/test/git.test.js index 0be62de4..3f80da12 100644 --- a/test/git.test.js +++ b/test/git.test.js @@ -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 => { - let {cwd, repositoryUrl} = await gitRepo(true); - const repoDir = cwd; + const {cwd, repositoryUrl} = await gitRepo(true); await gitCommits(['First'], {cwd}); await gitCommits(['Second'], {cwd}); await gitPush(repositoryUrl, 'master', {cwd}); t.true(await isBranchUpToDate('master', {cwd})); - cwd = await gitShallowClone(repositoryUrl); - await gitCommits(['Third'], {cwd}); - await gitPush('origin', 'master', {cwd}); + const tmpRepo = await gitShallowClone(repositoryUrl); + await gitCommits(['Third'], {cwd: tmpRepo}); + 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 => {