Best Practice for QUnit Test page
See original GitHub issueWhen writing the unitTests.qunit.html
it is unclear to me how to do the QUnit includes and how to write the html structure.
When looking at the guides and sources, I see many different setups:
- Walkthrough:
require
and extended html structure - Essentials: script tags and simple html (and TODO)
- GitHub (example):
require
and not as extended html - Upgrade Guide: Simplified html
- Explored example:
require
and simple html
Is there a best practice setup for QUnit test pages?
Is there an explanation, what the includes files do?
sap.ui.thirdparty.qunit
: Actual QUnitsap.ui.qunit.qunit-css
: QUnit stylingsap.ui.qunit.qunit-junit
: ???sap.ui.qunit.qunit-coverage
: Blanket code coveragesap.ui.qunit.QUnitUtils
: ???sap.ui.thirdparty.require
: ??? (Found in OpenUI5 code)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:15 (15 by maintainers)
Top Results From Across the Web
QUnit Tutorial: Start Unit Testing and Measuring Code Coverage
It's a best practice to have each unit test run in isolation. This is true for unit tests in every language or framework....
Read more >Simple JavaScript Testing with QUnit - New Relic
We'll cover how the testing units work and what they can do, along with what they're like to use. You'll get an informed...
Read more >Getting Started | QUnit
The eslint-plugin-qunit package has a variety of rules available for enforcing best testing practices as well as detecting broken tests.
Read more >Getting started with JavaScript Unit Testing using QUnit
It's usually good practice to have automated unit tests while developing your code. In unit testing, we test the smallest unit of the...
Read more >Getting Started with QUnit - SitePoint
This article introduces the QUnit testing framework. ... When creating a test, it's a best practice to set the number of assertions we ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, after a bit of silence i put up a pull request to QUnit. So we will be able to set autostart: false before loading QUnit. Then we may load it with a regular require statement.
@Michadelic I think we need to update our docs to
sinon-4
since it’s available undersap/ui/thirdparty/sinon-4
for a while already 😉