juriejan
juriejan

Reputation: 430

How do I run a specific test using the Polymer web-component-tester?

While developing a Polymer web component, more specifically while adding additional tests, it can become quite cumbersome to run all of the component's test each time I make an adjustment to the tests.

The simplest answer would be to comment out the tests that shouldn't run, but this also gets a but tiresome.

Since the web-component-tester makes use of Mocha there should probably be some way of indicating only a specific set of test to run. It's easy to target a specific file, but how would one go about targeting a specific test inside a file?

Upvotes: 9

Views: 786

Answers (1)

Serg
Serg

Reputation: 86

Have you tried exclusive tests in mocha? Example form documentation

describe('Array', function() {
  describe.only('#indexOf()', function() {
    // ...
  });
});

Upvotes: 2

Related Questions