From 24713ed59b34eb1c6321b3208af4ddd06487b1b7 Mon Sep 17 00:00:00 2001 From: Isaac Murchie Date: Fri, 23 Feb 2018 15:56:09 -0500 Subject: [PATCH] Fix some tests --- test/unit/commands/log-specs.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/unit/commands/log-specs.js b/test/unit/commands/log-specs.js index ddabed1a..21b3452a 100644 --- a/test/unit/commands/log-specs.js +++ b/test/unit/commands/log-specs.js @@ -17,6 +17,9 @@ describe('commands - logging', function () { driver.adb = new ADB(); }); describe('getLogTypes', function () { + it('should respond to the command', function () { + driver.getLogTypes.should.an.instanceof(Function); + }); it('should get log types', async function () { const types = await driver.getLogTypes(); // all the types should be returned @@ -24,14 +27,19 @@ describe('commands - logging', function () { }); }); describe('getLog', function () { + it('should respond to the command', function () { + driver.getLog.should.be.an.instanceof(Function); + }); it('should get logcat logs', async function () { sinon.stub(driver.adb, 'getLogcatLogs').returns(['logs']); (await driver.getLog('logcat')).should.be.deep.equal(['logs']); + driver.adb.getLogcatLogs.called.should.be.true; driver.adb.getLogcatLogs.restore(); }); it('should get bugreport logs', async function () { sinon.stub(driver.adb, 'bugreport').returns(`line1${os.EOL}line2`); (await driver.getLog('bugreport')).should.be.deep.equal(['line1', 'line2']); + driver.adb.bugreport.called.should.be.true; driver.adb.bugreport.restore(); }); });