Skip to content

Commit 65fc216

Browse files
committed
Eliminate "QUnit is not defined" errors
These appeared for tests involving an iframe, didn't affect the test result itself, but produced unhelpful noise when running tests. See gruntjs/grunt-contrib-qunit#202 Closes js-cookie#826
1 parent 3834c91 commit 65fc216

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Gruntfile.js

+6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ function encodingMiddleware (request, response, next) {
2121

2222
const config = {
2323
qunit: {
24+
options: {
25+
inject: [
26+
'test/fix-qunit-reference.js', // => https://github.com/gruntjs/grunt-contrib-qunit/issues/202
27+
'node_modules/grunt-contrib-qunit/chrome/bridge.js'
28+
]
29+
},
2430
all: {
2531
options: {
2632
urls: [

test/fix-qunit-reference.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
if (window.parent) window.QUnit = window.parent.window.QUnit

0 commit comments

Comments
 (0)