-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support sap.ui.require for QUnit testsuites or annotated modules
QUnit testsuites using `QUnit.config.autostart = false` and `QUnit.start()` are automatically detected to use `sap.ui.require` instead of `sap.ui.define`. Modules can be also marked to use `sap.ui.require` by using the annotation `/* @sapUiRequire */` in the program.
- Loading branch information
1 parent
afd2f7c
commit ac0078b
Showing
10 changed files
with
333 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/plugin/__test__/fixtures/sap-ui-require/othermodule.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/* @sapUiRequire */ | ||
|
||
import Control from "sap/ui/core/Control"; | ||
|
||
Control.extend("my.Control", {}); |
9 changes: 9 additions & 0 deletions
9
packages/plugin/__test__/fixtures/sap-ui-require/testsuite-annotation.qunit.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* @sapUiRequire */ | ||
|
||
// https://api.qunitjs.com/config/autostart/ | ||
QUnit.config.autostart = false; | ||
|
||
// import all your QUnit tests here | ||
void Promise.all([import("unit/controller/App.qunit")]).then(() => { | ||
QUnit["start"](); | ||
}); |
7 changes: 7 additions & 0 deletions
7
packages/plugin/__test__/fixtures/sap-ui-require/testsuite-autodetect.qunit.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// https://api.qunitjs.com/config/autostart/ | ||
QUnit.config.autostart = false; | ||
|
||
// import all your QUnit tests here | ||
void Promise.all([import("unit/controller/App.qunit")]).then(() => { | ||
QUnit.start(); | ||
}); |
7 changes: 7 additions & 0 deletions
7
packages/plugin/__test__/fixtures/sap-ui-require/testsuite-defect-1.qunit.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// https://api.qunitjs.com/config/autostart/ | ||
QUnit.config._autostart = false; | ||
|
||
// import all your QUnit tests here | ||
void Promise.all([import("unit/controller/App.qunit")]).then(() => { | ||
QUnit.start(); | ||
}); |
7 changes: 7 additions & 0 deletions
7
packages/plugin/__test__/fixtures/sap-ui-require/testsuite-defect-2.qunit.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// https://api.qunitjs.com/config/autostart/ | ||
QUnit.config.autostart = false; | ||
|
||
// import all your QUnit tests here | ||
void Promise.all([import("unit/controller/App.qunit")]).then(() => { | ||
QUnit._start(); | ||
}); |
9 changes: 9 additions & 0 deletions
9
packages/plugin/__test__/fixtures/sap-ui-require/testsuite.qunit.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* @sapUiRequire */ | ||
|
||
// https://api.qunitjs.com/config/autostart/ | ||
QUnit.config.autostart = false; | ||
|
||
// import all your QUnit tests here | ||
void Promise.all([import("unit/controller/App.qunit")]).then(() => { | ||
QUnit.start(); | ||
}); |
Oops, something went wrong.