-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QUnit
object is not present on this page
#3
Comments
What version of the plugin do you have? Can you post your test file? I need more to go on to help you. Thanks! |
Thanks for helping me! Plugins version is: |
My guess is that it's a problem with the relative path to the qunit.js file in your test. I'm using absolute paths in all my testing so that may be why I don't have the problem. So making your path absolute may solve the problem. I will try to fix it so that relative paths work though. Thanks! |
Thanks! You're right, changing paths of all js files to absolute urls solved this issue. Also: this seems almost impossibly fast! (9ms comparing to 340ms when using grunt and 90ms in a browser)! |
I cannot reproduce this using local copies of qunit.js on Mac or Windows so I'm not sure what's going on. I can't fix it if I can't reproduce it. I would suggest trying this change and see if that fixes your relative paths issue. gulp.task('test', function () {
return gulp.src('./tests/*.html').pipe(qunit());
}); |
Hi,
So the solution that worked for me was:
I've changed 2 lines in var fpath = ~file.path.indexOf('http') ? file.path : 'file:///' + file.path.replace(/\\/g, '/'),
childArgs = [ path.join(__dirname, 'runner.js'), fpath ]; I hope this helps and thanks for your time. |
+1 to tborychowski's comment. Fixing those 2 lines resolved this issue for me as well (experiencing the same thing. (on windows, and my gulp file basically is the same as the above, referencing ./tests/*.html ) |
I'll reopen this to get more data, but it clearly works for some without this fix. I'm wondering if this is an edge case. |
Please get the latest version 0.3.1. It has the fix for this. Thanks. |
I'm trying to switch from
grunt
togulp
and have some problems with this plugin.This is what I have (and the same works for
grunt-contrib-qunit
):but I'm getting this error in the console:
Is there anything specific like a setting or something required for this to work?
(I'm on windows7, and all the latest versions of phantomjs, nodejs & its modules)
The text was updated successfully, but these errors were encountered: