The problem was using Jasmine 2.0, when all of the tutorials were using Jasmine 1.3.
In Jasmine 2.0 a file boot.js was introduced.
And it was calling jasmine.getEnv().execute()
on window.onload
.
Because of that, specs were executing before Ext.launch was called.
Once I removed the call to execute()
from the boot.js it all started working.
Below is a final version of my TestApplication.js code
P.S. Note that, HtmlReporter is also initialized in the boot.js, so there is no need to init it on the Ext.launch function
Ext.Loader.setConfig({ enabled: true });
Ext.application({
name: 'myApp',
appFolder: '../App',
controllers: [],
autoCreateViewport: false,
// Launch Jasmine test environment
launch: function () {
var jasmineEnv = jasmine.getEnv();
jasmineEnv.updateInterval = 1000;
jasmineEnv.execute();
}
});