mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2026-04-24 00:00:03 +08:00
added support for skipping tests
This commit is contained in:
@@ -10,12 +10,12 @@ const app = {
|
||||
|
||||
var onlyFlaggedTests = [];
|
||||
var enabledTests = [];
|
||||
|
||||
|
||||
tests.forEach(function (test) {
|
||||
if (test.only) {
|
||||
onlyFlaggedTests.push(test);
|
||||
}
|
||||
|
||||
|
||||
if (!test.disabled) {
|
||||
enabledTests.push(test);
|
||||
}
|
||||
@@ -50,6 +50,16 @@ const app = {
|
||||
};
|
||||
},
|
||||
|
||||
skip: function (content) {
|
||||
document.getElementById('statusInput').value = 'finished';
|
||||
app.printResult('result - skipped', content);
|
||||
|
||||
app.lastResult = {
|
||||
type: 'skipped',
|
||||
data: content
|
||||
};
|
||||
},
|
||||
|
||||
throw: function (error) {
|
||||
document.getElementById('statusInput').value = 'finished';
|
||||
app.printResult('result - throwed', error.message);
|
||||
@@ -126,7 +136,7 @@ const app = {
|
||||
|
||||
const execTest = function () {
|
||||
try {
|
||||
testDefinition.func(app.resolve, app.reject);
|
||||
testDefinition.func(app.resolve, app.reject, app.skip);
|
||||
} catch (error) {
|
||||
app.throw(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user