vendredi 27 mai 2016

using chutzpah and jasmine with typscript and systemjs

I am having trouble getting an import working in a jasmine unit test that is written in typescript. Chutzpah is throwing an error on the import statement - which in js gets translated to a define

import {fakeclass} from '../src/data-analysis/fakeclass';

The error I see is:

Error: ReferenceError: Can't find variable: define

Otherwise the test gets discovered and runs fine.

I assume it has to with systemjs not being loaded by chutzpah - is there a recommended way to set this up?

here is my chutzpah.json file

{
  "Framework": "jasmine",
  "TestHarnessReferenceMode": "Normal",
  "TypeScriptModuleKind": "CommonJS",

  "Compile": {
  "Mode": "External",
  "Extensions": [ ".ts" ],
  "ExtensionsWithNoOutput": [ ".d.ts" ]

},
"References": [
{
  "Includes": [ "src/*.ts" ],
  "Excludes": [ "src/*.d.ts" ]
}
],
"Tests": [
{
  "Includes": [ "*/test/*.ts" ],
  "Excludes": [ "*/test/*.d.ts" ]
}
]}

Aucun commentaire:

Enregistrer un commentaire