0

I am trying to run Jasmine js tests in Microsoft Edge, but I get the following error:

Object doesn't support property or method 'initializeJasmine'

I am launching my tests from visual studio with the Chutzpah plugin.

From what I can see in the edge console, the exception is from the following code:

var currentWindowOnload = window.onload;

window.onload = function() {
   if (currentWindowOnload) {
      currentWindowOnload();
   }
   window.initializeJasmine(); // <--- Exception here
};

My tests runs in all my other browsers (Chrome, IE, FF and Opera), but it doesn't seem to work in MSEdge.

Anyone having the same issue?

How can I make them run in Microsoft Edge?

Samuel Poirier
  • 1,240
  • 2
  • 15
  • 30
  • can you post a demo? Sounds like jasmine isn't included on the page, or it has an error preventing it from initializing properly. – Patrick Nov 28 '15 at 04:52
  • I found out that when I am changing my js files to the cdn version, instead of local files, my tests runs in Edge. There is something preventing the browser from accessing local files since it runs in an app container or something. – Samuel Poirier Dec 02 '15 at 20:07

1 Answers1

0

I'm using Edge for Jasmine test.

Find the directory: node_modules/karma-chrome-launcher

Change all patch chrome for edge:

var windowsChromeDirectory, i, prefix var suffix = '\Microsoft\' + chromeDirName + '\Application\msedge.exe' var prefixes = [process.env.LOCALAPPDATA, process.env.PROGRAMFILES, process.env['PROGRAMFILES(X86)']]

and change all getChromeExe('Chrome') -> ('Edge').

It's not efficient, but it works.img_jasmine_edge