More clearly differentiate between spec and suite ids
This commit is contained in:
@@ -629,12 +629,12 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
|
||||
// TODO: move this to closure
|
||||
Env.prototype.nextSpecId = function() {
|
||||
return this.nextSpecId_++;
|
||||
return 'spec' + this.nextSpecId_++;
|
||||
};
|
||||
|
||||
// TODO: move this to closure
|
||||
Env.prototype.nextSuiteId = function() {
|
||||
return this.nextSuiteId_++;
|
||||
return 'suite' + this.nextSuiteId_++;
|
||||
};
|
||||
|
||||
// TODO: move this to closure
|
||||
|
||||
@@ -8,9 +8,9 @@ describe("Env", function() {
|
||||
|
||||
describe('ids', function() {
|
||||
it('nextSpecId should return consecutive integers, starting at 0', function() {
|
||||
expect(env.nextSpecId()).toEqual(0);
|
||||
expect(env.nextSpecId()).toEqual(1);
|
||||
expect(env.nextSpecId()).toEqual(2);
|
||||
expect(env.nextSpecId()).toEqual('spec0');
|
||||
expect(env.nextSpecId()).toEqual('spec1');
|
||||
expect(env.nextSpecId()).toEqual('spec2');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -25,11 +25,11 @@ describe("jasmine spec running", function () {
|
||||
});
|
||||
});
|
||||
|
||||
expect(it0.id).toEqual(0);
|
||||
expect(it1.id).toEqual(1);
|
||||
expect(it2.id).toEqual(2);
|
||||
expect(it3.id).toEqual(3);
|
||||
expect(it4.id).toEqual(4);
|
||||
expect(it0.id).toEqual('spec0');
|
||||
expect(it1.id).toEqual('spec1');
|
||||
expect(it2.id).toEqual('spec2');
|
||||
expect(it3.id).toEqual('spec3');
|
||||
expect(it4.id).toEqual('spec4');
|
||||
});
|
||||
|
||||
it('nested suites', function (done) {
|
||||
@@ -305,4 +305,4 @@ describe("jasmine spec running", function () {
|
||||
));
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -259,12 +259,12 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
|
||||
// TODO: move this to closure
|
||||
Env.prototype.nextSpecId = function() {
|
||||
return this.nextSpecId_++;
|
||||
return 'spec' + this.nextSpecId_++;
|
||||
};
|
||||
|
||||
// TODO: move this to closure
|
||||
Env.prototype.nextSuiteId = function() {
|
||||
return this.nextSuiteId_++;
|
||||
return 'suite' + this.nextSuiteId_++;
|
||||
};
|
||||
|
||||
// TODO: move this to closure
|
||||
|
||||
Reference in New Issue
Block a user