1.0.5 • Published 8 years ago

nested-test-name-under-cursor v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

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.

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.0

8 years ago