0

Is there a way to specify an alternate AMD loader for intern?

I use ESRI's ArcGIS API for JavaScript and unfortunately don't have access to their source code. So I'm stuck having to load their code from here.

Their API is build on top of Dojo, so I'm thinking that I should be able to test with intern if I can point it at their loader instead of the one that comes with intern.

Baby Groot
  • 4,637
  • 39
  • 52
  • 71
Scott
  • 117
  • 7

1 Answers1

0

As of Intern 1.2, you can specify an alternate AMD loader for the browser client by changing <script src="node_modules/dojo/dojo.js"></script> within client.html, and for the command-line client by changing var req = require('dojo/dojo') in client.js. It is not currently possible to change the test runner’s loader (runner.js) because the Node.js module loader relies on being able to find the overridden Node.js require in another specific (non-standard) location.

C Snover
  • 17,908
  • 5
  • 29
  • 39
  • Thanks for the info. Is there an issue that I can follow for progress on allowing an alternative loader in client.js? – Scott Aug 01 '13 at 14:02
  • It should be possible today with Intern 1.2. Only the test runner (runner.js) will have difficulty. – C Snover Aug 01 '13 at 19:21