Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@sapui5/ts-types-esm - missing types for jsUnitTestSuite? #310

Open
DetachHead opened this issue Nov 25, 2021 · 2 comments
Open

@sapui5/ts-types-esm - missing types for jsUnitTestSuite? #310

DetachHead opened this issue Nov 25, 2021 · 2 comments
Labels
types ES modules types (recommended)

Comments

@DetachHead
Copy link

ie. how would i convert this to typescript?

window.suite = function() {
	"use strict";

	var oSuite = new parent.jsUnitTestSuite(),
		sContextPath = location.pathname.substring(0, location.pathname.lastIndexOf("/") + 1);

	oSuite.addTestPage(sContextPath + "unit/unitTests.qunit.html");
	oSuite.addTestPage(sContextPath + "integration/opaTests.qunit.html");

	return oSuite;
};
@DetachHead DetachHead changed the title @sapuit/ts-types - missing types for jsUnitTestSuite? @sapui5/ts-types - missing types for jsUnitTestSuite? Nov 27, 2021
@petermuessig petermuessig added types ES modules types (recommended) legacy ts-types (with globals) Related to legacy Global types (deprecated) and removed types ES modules types (recommended) labels Nov 28, 2021
@petermuessig
Copy link
Contributor

Same like #306 - testing related code wasn't in focus of TS API support so far.

BTW: the jsUnitTestSuite is really legacy code - I don't think we should propagate it further. This is related to one of the early stuff from more than a decade back... 😁 There is a new more declarative way, which we didn't describe so far yet, e.g.:

https://github.com/SAP/openui5/blob/master/src/sap.f/test/sap/f/qunit/testsuite.qunit.html
https://github.com/SAP/openui5/blob/master/src/sap.f/test/sap/f/qunit/testsuite.qunit.js

@DetachHead DetachHead changed the title @sapui5/ts-types - missing types for jsUnitTestSuite? @sapui5/ts-types-esm - missing types for jsUnitTestSuite? Nov 29, 2021
@petermuessig petermuessig added types ES modules types (recommended) and removed legacy ts-types (with globals) Related to legacy Global types (deprecated) labels Nov 29, 2021
@petermuessig
Copy link
Contributor

The usage of the old testsuite code is related to the following "Worklist" walkthrough example:
https://github.com/SAP/openui5/blob/2bba4ea6a49332575a87de443efdc6893d66b153/src/sap.m/test/sap/m/demokit/tutorial/worklist/06/webapp/test/testsuite.qunit.js

@codeworrior : we should also consider to update the walkthroughs with the latest declarative qunit testsuites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types ES modules types (recommended)
Projects
None yet
Development

No branches or pull requests

2 participants