gestion des demandes d'évolution pour le centre kalachakra non géré dans les module booking et opendons
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

50 lines
1.1 KiB

// convert cruiser.js Specification objects to jasmine tests
(function(){
var exp;
function Specification(spec) {
for(suite in spec) {
describe(suite, function(){
if(spec[suite].setup) {
beforeEach(spec[suite].setup);
}
for(test in spec[suite]) {
if(test !== 'setup' && spec[suite].hasOwnProperty(test)) {
//embed in an IIFE so that the same test doesn't get run over and over
(function(s,testJig){
it(test, function(){
//apply is used to ensure that run and assert get the same contexts
testJig.run.call(this);
if(testJig.expect) {
testJig.expect.call(this,expect);
} else {
if(s.length > 3 && s.substring(0,4) === 'Fail') {
expect(testJig.assert.call(this)).toBe(false);
} else {
expect(testJig.assert.call(this)).toBe(true);
}
}
})
})(suite,spec[suite][test]);
}
}
})
}
}
if(typeof module !== 'undefined') {
module.exports = Specification;
} else {
window.Specification = Specification;
}
})();