From 52e5dcaea0f6eb1c4c6a4f4bd0c7ba280fad2c6e Mon Sep 17 00:00:00 2001 From: Kamil Piechaczek Date: Tue, 11 Sep 2018 14:15:21 +0200 Subject: [PATCH] Moved stub of fs.lstatSync to the test case. --- tests/commands/sync.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/commands/sync.js b/tests/commands/sync.js index 3b94585..c54ee6c 100644 --- a/tests/commands/sync.js +++ b/tests/commands/sync.js @@ -28,7 +28,6 @@ describe( 'commands/sync', () => { exec: sinon.stub(), fs: { existsSync: sinon.stub( fs, 'existsSync' ), - lstatSync: sinon.stub( fs, 'lstatSync' ), readdirSync: sinon.stub( fs, 'readdirSync' ) }, path: { @@ -324,6 +323,8 @@ describe( 'commands/sync', () => { describe( 'afterExecute()', () => { it( 'informs about number of processed packages and differences between packages in directory and defined in mgit.json', () => { + stubs.fs.lstatSync = sinon.stub( fs, 'lstatSync' ); + const consoleLog = sinon.stub( console, 'log' ); const processedPackages = new Set();