Test is passing now but I've been confuse about something! The problem occurred from separateContext * config which used in harness.configure. I had comment this config and then when I checked test suite, it passed.
But the thing is I've not specified location.search.match('unittest') anywhere! Also I've deleted ?unittest parameter from pageUrl config but that worked as well! Isn't there anything wrong within theory?
So the finally harness;
harness.configure({
title : 'Siesta Examples',
// viewDOM : true,
// waitForTimeout: 10000,
// separateContext: true,
// enableCodeCoverage: true
});
harness.start(
{
group : 'Unit Tests',
runCore : 'sequential',
items : [
{
title : 'Globals',
pageUrl : '../../index.html',
url : '01-unit-tests/010_globals.t.js'
}
]
},
describe('MyApp Globals', function(t) {
t.ok(MyApp.view.main.MainPort, 'Found mainview');
t.describe('getStatusDesc() method', function(t) {
t.it('should be a function', function(t) {
t.expect(typeof MyApp.Globals.getResStatusDesc).toEqual('function');
});
t.it('should return a string', function(t) {
t.expect(typeof MyApp.Globals.getResStatusDesc()).toEqual('string');
});
});
});