0

I'm using Chutzpah, with Jasmine, to unit test a number of AMD modules using Require.js.

My unit test project is separate to both the modules under test and the require.js config file.

I'm using chutzpah.json to connect these together, as such:

{
"Framework": "jasmine",
"TestHarnessReferenceMode": "AMD",
"TestHarnessLocationMode": "SettingsFileAdjacent",
"EnableTestFileBatching": true,
"AMDBasePath": "matches baseUrl path in require.js config file",
"References" : [
    {"Path" : "path to require.js" },
    { "Path": "path to require.js config file" }
],
"Tests" : [
  {"Path": "Specs"}
]

}

The tests run okay as expected.

The issue is that somewhere in the magic of resolving dependencies, I'm getting errors that a number of the css files cannot be located. These are relative paths and I'm guessing that because I'm initiating the test from a separate project it cannot correctly identify the base path.

As I say this isn't an issue running tests locally, but would cause an issue when integrating with a CI build.

Has anybody experienced this before and know of a workaround?

Darren Young
  • 10,972
  • 36
  • 91
  • 150
  • It is difficult to diagnose these types of questions with out a real working sample/repro. Could you create a simple repro and push to github (or your code sharing tool of choice)? – Matthew Manela Jul 07 '15 at 13:36
  • Thanks Matthew. I'll get something together over the next couple of days (maybe the weekend) and upload to GitHub. I'll comment here once I've done so. – Darren Young Jul 07 '15 at 13:40

0 Answers0