Skip to content

Commit

Permalink
Eliminate "QUnit is not defined" errors
Browse files Browse the repository at this point in the history
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 #826
  • Loading branch information
carhartl committed Jun 21, 2023
1 parent 3834c91 commit 65fc216
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Gruntfile.js
Expand Up @@ -21,6 +21,12 @@ function encodingMiddleware (request, response, next) {

const config = {
qunit: {
options: {
inject: [
'test/fix-qunit-reference.js', // => https://github.com/gruntjs/grunt-contrib-qunit/issues/202
'node_modules/grunt-contrib-qunit/chrome/bridge.js'
]
},
all: {
options: {
urls: [
Expand Down
1 change: 1 addition & 0 deletions test/fix-qunit-reference.js
@@ -0,0 +1 @@
if (window.parent) window.QUnit = window.parent.window.QUnit

0 comments on commit 65fc216

Please sign in to comment.