In Jasmine 1.3, we had this option to the get current spec and suite names:
describe(\"name for describe\", function () {
it(\"name for it\", function ()
The reason this no longer works is because this
is not the test. You can introduce a subtle change to your declarations however that fix it. Instead of just doing:
it("name for it", function() {});
Define the it
as a variable:
var spec = it("name for it", function() {
console.log(spec.description); // prints "name for it"
});
This requires no plug-ins and works with standard Jasmine.