From e505e4aeb0ad3176492ce72cee2314fcf66e8cee Mon Sep 17 00:00:00 2001 From: Nick Stenning Date: Wed, 10 Dec 2014 14:55:43 +0100 Subject: [PATCH] Fix horrible issue with karma-bro We still (after close to 2 days digging into this) don't understand what's going wrong here. Despite apparently having restored all package versions to ones that previously worked, we've been unable to get this working again. While debugging the issue we discovered that adding a bundle call in the prebundle hook gets the tests passing again. This is a horrible fix and doesn't relieve us of the need to understand what's going on here and how to fix it, but I don't want to burn any more time on this problem for now. --- karma.conf.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/karma.conf.js b/karma.conf.js index bd99f6822..b9716f789 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -35,6 +35,10 @@ module.exports = function (karma) { // This allows annotator-plugintools to require annotator as // 'annotator' in the test environment. bundle.require('./src/annotator', {expose: 'annotator'}); + // This, for reasons that remain entirely unclear, fixes an + // issue where the above require doesn't seem to work, and the + // karma build dies saying "Cannot find module 'annotator' ..." + bundle.bundle(); } },