Reputation: 32946
I have some typescript tests which are running fine using Chutzpa to run them.
Today I added a property of type Map<K,V>
to my model being tested and now all tests which use that model fail when I run them using the headless (PhantomJS) runner. They do, however, work if I tell Chutzpah to run them in the browser (chrome)
The error I get is
Can't find variable: Map in 'some path'
but the JS files are removed by Chutzpah so I can't open them and see what the issue is.
I suspect that it might be some typescript version issue (the headless runner is using an older typescript version maybe) but am not sure how to either prove this or make the headless runner use a specified version of typescript.
Upvotes: 0
Views: 435
Reputation: 16762
Two things.
First itt sounds like you are using the legacy compilation mode in Chutzpah. That mode is no-recommended since it uses a fixed version of TypeScript to compile the JS. You should use the recommended Compile settings.
Second, if it is working in the browser and not in Phantom and Chutzpah is compiling both then it is probably not a typescript issues. If you run chutzpah from the command line you can set the /debug flag which is leave the HTML files around to investigate.
Upvotes: 1