Larsi
Larsi

Reputation: 4774

How to prevent qunit-fixture to be erased when running a single test

It would be useful to have a visual look of the markup being generated by the unit tests. Are there any build in configuration for this?

That is, what should I do to prevent the test runner to clear the qunit-fixture element when I select to run a single test?

Upvotes: 1

Views: 408

Answers (1)

Jordan Kasper
Jordan Kasper

Reputation: 13273

As the commenter points out, you can simply not use qunit-fixture and instead have an element that you use as a fixture... but of course, if you leave the output after a test, then it isn't really a fixture.

The idea would be to add a simple <div id="test-html"> ... </div> to your test file and then operate within that for your test. It won't be cleared out after tests run, but again, it isn't really a test fixture then - use with caution.

Upvotes: 1

Related Questions