From dd36ebc7a006dc912e1d54578994327534b6e1c2 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Mon, 27 Jun 2022 10:15:35 -0700 Subject: [PATCH] Got test coverage back to 100% --- src/use-cases/index.js | 16 +++++++++------- test/unit/use-cases/index.use-case.unit.js | 13 +++++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/use-cases/index.js b/src/use-cases/index.js index 6560709..69f56e1 100644 --- a/src/use-cases/index.js +++ b/src/use-cases/index.js @@ -21,13 +21,15 @@ class UseCases { // Run any startup Use Cases at the start of the app. async start () { - try { - console.log('Async Use Cases have been started.') - } catch (err) { - console.error('Error in use-cases/index.js/startUseCases()') - console.log(err) - throw err - } + // try { + console.log('Async Use Cases have been started.') + + return true + // } catch (err) { + // console.error('Error in use-cases/index.js/start()') + // // console.log(err) + // throw err + // } } } diff --git a/test/unit/use-cases/index.use-case.unit.js b/test/unit/use-cases/index.use-case.unit.js index a3043d0..6830a71 100644 --- a/test/unit/use-cases/index.use-case.unit.js +++ b/test/unit/use-cases/index.use-case.unit.js @@ -47,4 +47,17 @@ describe('#use-cases', () => { } }) }) + + describe('#start', () => { + it('should initialize async use cases', async () => { + const result = await uut.start() + + assert.equal(result, true) + }) + + // it('should catch and throw errors', async () => { + // // Force an error + // sandbox.stub() + // }) + }) })