Sunday 15 July 2012

unit testing - Intern excludeInstrumentation regex fails to exclude modules -


I am new to interns and am trying to figure out how to configure it for our project. Our file hierarchy is not exactly the same as the examples of readmade for interns on tutorials or internships. I think package locations have been correctly assigned to me because it does not complain about finding the test module, it also appears to run the test, but then the remaining modules defined in my package module But tries to run the test It tries to load first ... / dojo / _base / declare.js so I tried to specify the value of the excluded property value.

I have specified it as:

  exclusion: / ^ (? Dojo | dijit | dgrid | test) \ //   

But it does not exclude it. My goal module defines:

  define (['dojo / _base / declare', 'dojo / _base / lang', 'dojo / dom-creation', 'dojo / on' , 'Dojo / Query', ... 'Deceit / Layout / Border Container', 'Desitz / Layout / Contentpane', 'Degit / Form / Text Box', ... 'Degrid / On Demand Grid', 'Digit / Keyboard ', ...   

But I get errors:

  node node_module / intern / client.js config = tests / intern in "console" reporter Error: / Home / bholm / projects / src / sa Failed to declare module on dox / dbase / /home/bholm/Projects/src/sandbox/dojo/_base/declare.js (guardian: ev / grids / FilterGrid) on ndbox / node_moduleules / intern / node_modules / dojo / dojo. At js: 742: 12 fs.js: 207: 20 Objects Full (fs.js: 107: 15)   

I should pay attention to the Dojo, dijit and dgrid packages actually located There are: / home / bholm / projects / src / sandbox / libs / dojo / ... (notices in addition to libs in path).

I forgot to add my loader property to the config file intern.js For:

  Loader: {// baseUrl: '. ., Package: [{name: 'enter', location: 'nod_modia / enter'}, {name: 'avi', location: 'web / libs / eve'}]},   < P> No idea why not include regex?  

  1. Do not insert the application into your loader configuration in the application-specific configuration only in the loader configuration.
  2. Excluded structures only to prevent your code from being modified with code coverage data when passed through Internet proxy, how this loader works, or your AMD does not prevent dependence from being normally requested and loaded.
  3. If your application uses third party packages (dojos, digit, etc.), which is directly required by the baseUrl , then you need to make sure that they package , Such that they need to be configured while running the actual application.

No comments:

Post a Comment