Replacing Chai Assertion Library in Intern -


now i've gotten intern run tests, replace chai assertion library expect.js library. expect.js node module i've downloaded project using npm. i've been looking @ following resources piece how import module using dojo/node loader plugin provided intern, haven't quite hang of it. i'm either using loader.packages incorrectly, or not using correct path in test file include module.

can't intern run node.js module

dojo/node

amd api wiki re: packages

  1. my project hierarchy (if there best practice, or better way, setting project node modules, can change hierarchy)

    apefintern/     apeform/         lib/             sinon.js           - mocking library         node_modules/             expect/                 expect.js      - node package         test/             intern.js          - intern configuration             spec_inwf.js       - tests inwf.js         inwf.js                - code test     intern/ 
  2. intern configuration file

    // ...  loader: {     // pretty sure need register package loader, not i'm not positive on correct path use.     //packages: [ 'apeform/node_modules/expect' ]     packages: [ 'apeform' ]     //packages: [ 'expect' ] },  // non-functional test suite(s) run in each browser suites: [ 'apeform/test/spec_inwf' ],  // ... 
  3. test file - i've tried different ways of referencing node module, based upon comments in question.

    define([     'intern!bdd',     //'intern/chai!expect',     //'intern/dojo/node!expect',     //'intern/dojo/node!./apeform/node_modules/expect/expect'     'intern/dojo/node!apeform/node_modules/expect',     'apeform/lib/sinon.js',     'apeform/inwf.js' ], function (bdd, expect) {     (bdd) {         // tests ... }); 

i'm trying replace assert library present in intern can run tests against ie 6. know there geezer branch of intern ie 6-8, looks assertion library difference between branches , prefer expects syntax on assert.

expect.js installs folder includes ".js".

try using 'intern/dojo/node!./apeform/node_modules/expect.js' setup mentioned above.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -