I'm trying to get Chai/jQuery working with RequireJS, and I can't seem to get it to patch Chai. Specifically, I have the following in my runner.js file:
paths: {
// ... Other paths
chai: "../lib/chai",
chai_jquery: "../lib/chai-jquery",
mocha: "../lib/mocha"
},
shims: {
mocha: { exports: "mocha" }
// Have tried with and without this, which should be unnecessary:
// chai_jquery: { deps: ["jquery", "chai"] }
}
When I run the specs, jQuery objects haven't been patched with the appropriate methods -- for example, attr. What am I doing wrong?
I'm trying to get Chai/jQuery working with RequireJS, and I can't seem to get it to patch Chai. Specifically, I have the following in my runner.js file:
And the following in my config.js file:
When I run the specs, jQuery objects haven't been patched with the appropriate methods -- for example,
attr
. What am I doing wrong?