casperlamboo/plugin-worker

karma Testing

Opened this issue · 1 comments

Hey

Really nice package. I have the package in my project however when its initialised it brakes my tests. Im still really new to testing so maybe its not a real issue with the package and more my testing ability.

Anyway i get the following when running tests when the package is included

PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  ReferenceError: Can't find variable: System
  at blob:http://localhost:9876/b1ee779a-edb2-4297-b4de-910289c3b981:2

PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 0 of 22 ERROR (0.014 secs / 0 secs)

I see that System is being used from loader-dev.js and loader-production.js. What is the best way of including System so can unit test the worker?

Thanks.

I'm not really familiar with PhantomJS so I'm not sure if I can really help you. Generally you would just include SystemJS in your page like

<script src="system.js"></script>