question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Best Practice for QUnit Test page

See original GitHub issue

When 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:

Is there a best practice setup for QUnit test pages?

Is there an explanation, what the includes files do?

  • sap.ui.thirdparty.qunit: Actual QUnit
  • sap.ui.qunit.qunit-css: QUnit styling
  • sap.ui.qunit.qunit-junit: ???
  • sap.ui.qunit.qunit-coverage: Blanket code coverage
  • sap.ui.qunit.QUnitUtils: ???
  • sap.ui.thirdparty.require: ??? (Found in OpenUI5 code)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
TobiasOetzelcommented, Oct 12, 2016

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.

1reaction
pavelkornevcommented, Aug 17, 2018

@Michadelic I think we need to update our docs to sinon-4 since it’s available under sap/ui/thirdparty/sinon-4 for a while already 😉

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found