From 1ad4a5937acf02e44f78563bd1d7acc4988c0e33 Mon Sep 17 00:00:00 2001 From: Shukri Adams Date: Mon, 21 Jun 2021 22:49:57 +0200 Subject: [PATCH] fixed tests --- src/test/lib/history/getLastEvent.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/lib/history/getLastEvent.js b/src/test/lib/history/getLastEvent.js index 622229e..651da1b 100644 --- a/src/test/lib/history/getLastEvent.js +++ b/src/test/lib/history/getLastEvent.js @@ -10,7 +10,7 @@ describe('lib/history/getLastEvent', async()=>{ }) ctx.inject.object('madscience-fsUtils', { - readFilesInDir: ()=> [{}] // return 1 event + readFilesInDir: ()=> ['status.json', 'item.json'] // return 2 events, 1 will always }) const event = await history.getLastEvent('test') @@ -45,7 +45,7 @@ describe('lib/history/getLastEvent', async()=>{ ctx.assert.null(event) }) - it('lib/history/getLastEvent::unhappy read json throws', async()=>{ + it('lib/history/getLastEvent::unhappy read json throws error', async()=>{ const ctx = require(_$t+'context'), history = ctx.clone(require(_$+'lib/history')) @@ -55,7 +55,7 @@ describe('lib/history/getLastEvent', async()=>{ }) ctx.inject.object('madscience-fsUtils', { - readFilesInDir: ()=> [{}] // return 1 event + readFilesInDir: ()=> ['item.json'] // return 1 event }) const event = await history.getLastEvent('test')