From d81e342ef0d17ec3dd7d7893a2656ca110d70d62 Mon Sep 17 00:00:00 2001 From: Sulka Haro Date: Mon, 14 Dec 2020 22:30:21 +0200 Subject: [PATCH] Fix pushover test --- tests/pushover.test.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/pushover.test.js b/tests/pushover.test.js index db8b0dea9e8..c49cc44cf3a 100644 --- a/tests/pushover.test.js +++ b/tests/pushover.test.js @@ -3,6 +3,10 @@ var should = require('should'); var levels = require('../lib/levels'); +var ctx = { + levels:levels +} + describe('pushover', function ( ) { var baseurl = 'https://nightscout.test'; @@ -20,7 +24,7 @@ describe('pushover', function ( ) { , levels:levels }; - var pushover = require('../lib/plugins/pushover')(env); + var pushover = require('../lib/plugins/pushover')(env, ctx); it('convert a warning to a message and send it', function (done) { @@ -79,7 +83,7 @@ describe('support legacy pushover groupkey', function ( ) { , levels: levels }; - var pushover = require('../lib/plugins/pushover')(env); + var pushover = require('../lib/plugins/pushover')(env, ctx); it('send', function (done) { @@ -116,7 +120,7 @@ describe('multi announcement pushover', function ( ) { , levels: levels }; - var pushover = require('../lib/plugins/pushover')(env); + var pushover = require('../lib/plugins/pushover')(env, ctx); it('send multiple pushes if there are multiple keys', function (done) { @@ -161,7 +165,7 @@ describe('announcement only pushover', function ( ) { , levels: levels }; - var pushover = require('../lib/plugins/pushover')(env); + var pushover = require('../lib/plugins/pushover')(env, ctx); it('send push if announcement', function (done) {