From 29e7b5e343763c6c35bea14136b32beda500a4d1 Mon Sep 17 00:00:00 2001 From: Nas Villanueva Date: Mon, 29 Oct 2018 10:44:44 +0900 Subject: [PATCH] Bind jasmineEnv to configuration setters Since jasmine@3.3.0, all jasmine single method configurations calls to `this.deprecated` primarily to print a deprecation warning. Those single method configuration should be called with an appropriate `this`, which would be the jasmineEnv --- src/adapter.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/adapter.js b/src/adapter.js index 7fff079..134a230 100644 --- a/src/adapter.js +++ b/src/adapter.js @@ -367,8 +367,9 @@ function createStartFn (karma, jasmineEnv) { jasmineEnv.execute() } - function setOption (option, set) { - if (option != null && typeof set === 'function') { + function setOption (option, setter) { + if (option != null && typeof setter === 'function') { + var set = setter.bind(jasmineEnv) set(option) } }