mochajs / mocha

☕️ simple, flexible, fun javascript test framework for node.js & the browser
https://mochajs.org
MIT License
22.59k stars 3.01k forks source link

🛠️ Repo: HTML reporter needs tests #3071

Open boneskull opened 7 years ago

boneskull commented 7 years ago

We have decent coverage in most places now. The glaring exception is the HTML reporter, which is completely untested.

Add tests for the HTML reporter.

This will necessitate likely some unit tests and browser-based functional tests. The latter of which we have none of, so we'd need to pull in some extra dependencies to do so. This won't be trivial.

ScottFreeCode commented 7 years ago

I have branches that do this with Karma that I need to rebase (and see if the issues on Sauce went away or not). Bonus: the test coverage for the browser, while I implemented it for the reporter, theoretically opens the door to browser-specific units tests if we still have anything that would need it (I dunno if all of those were shims we've now gotten rid of) or browser integration tests (e.g. for https://github.com/mochajs/mocha/pull/1800#issuecomment-319479473) with alternate Karma settings (something I still need to explore to ensure they're set up right).

rugk commented 6 years ago

@ScottFreeCode You are still assigned to this even though a PR is there in https://github.com/mochajs/mocha/pull/3102.

craigtaub commented 5 years ago

@rugk seems like the owner has lost interest, perhaps checkout branch, rebase and re-open PR if you are still interested. It sounded close if passes IE11 testing.

juergba commented 3 years ago

@giltayar do you have any suggestions how to start with this one? We also have some funds available we could invest.

juergba commented 3 years ago

There is playwright of Microsoft. They also offer their own test runner for Node. Folio, "a highly customizable test framework", available in preview. This is going to be a very competitive player in test frameworks.

giltayar commented 3 years ago

There's no lack of browser automation tools, although not sure this is needed. I would go with a simpler snapshot test (i.e. save the HTML baseline file, and always compare against that). Usually, I'm not a fan of these, but given that we're looking at one or two tests, I think it's the easiest solution.

If you do want a browser automation test. Given that there aren't a lot of tests here, I would go with the tried and true: Selenium WebDriver.

SmokeDawg92967 commented 2 years ago

I don't believe this