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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -