I tried to nest them this way, and seem its stopped at the level where describe("When...spec2 child", function () {
starts.
I wonder is that's the level of how deep jasmine allow to nest suites? Or is there something I did wrong? Any help will be appreciated. Thanks!
describe("ModelSpec", function () {
/*Initial Test Properties*/
var Subject = require('../../lib/jasmine_examples/Model');
var Data = require('../../lib/jasmine_examples/MockData');
var input = new Data();
var model = new Subject(input);//service itself
var mock = {
truthy : true,
falsy : false,
obj : {},
arr : [],
arrOfObj : [ { } ],
nul : null,
undef : undefined,
};
beforeEach(function () {
});
it("Spec 1", function () {
expect(model).toBeDefined();
});
it("Spec 1.2", function () {
expect(model).toBeDefined();
});
describe("When...", function () {
/*
You can initiate another set of test properties vars here
*/
beforeEach(function () {
});
it("Spec 2", function () {
expect(model).toBeDefined();
describe("When...spec2 child", function () {
beforeEach(function () {
});
it("Spec 2 child", function () {
});
});
});
it("Spec 3", function () {
expect(model).toBeDefined();
expect(input.id).toBeDefined();
});
});
Aucun commentaire:
Enregistrer un commentaire