javascript - Include jQuery in intern test -
how can test custom javascript app (including jquery dependency)? have tried jquery node package no success...
do need define somehow in test suite dependencies? tried this:
define([ 'intern!bdd', 'intern/chai!expect', 'node-jquery' ], ...
you’re on right track. if trying load , test arbitrary javascript, this:
define([ 'intern!bdd', 'intern/chai!expect', 'libs/jquery.js', 'app/foo.js', 'app/bar.js' ], function (bdd, expect) { bdd.describe('my test', function () { bdd.it('should find foos on page', function () { expect(jquery('.foo')).to.have.length.of.at.least(2); }); }); // access other global variables here });
Comments
Post a Comment