nested-test-name-under-cursor

1.0.5 • Public • Published

nested-test-name-under-cursor

Build Status

Determine the full name of a test or group of tests at a given file + line number.

Given the following Jasmine/Mocha/etc test:

describe("my amazing test suite", function () {
  describe("nest level 1", function () {
    it("knows how to add 2 + 2", function () {
      expect(2 + 2).toEqual(4);
    });
  });
});

nested-test-name-under-cursor sample_spec.js 1 => "my amazing test suite"

nested-test-name-under-cursor sample_spec.js 4 => "my amazing test suite nest level 1 knows how to add 2 + 2"

Why?

Using a spec filter, Jasmine can focus tests based on name or deterministic test ID, but not by line number.

The output of this tool (plus some IDE and test suite specific finessing) can be used to implement focused testrunning without having to fit or fdescribe your tests.

Readme

Keywords

Package Sidebar

Install

npm i nested-test-name-under-cursor

Weekly Downloads

0

Version

1.0.5

License

MIT

Last publish

Collaborators

  • tjgrathwell