mocha-qtest-mapping-reporter
Advanced tools
Comparing version 1.0.9 to 1.1.0
48
index.js
@@ -84,12 +84,5 @@ const mocha = require('mocha') | ||
} | ||
if (!qTestClient) return | ||
if (!qTestClient) { return } | ||
test.qTest = { | ||
executionLog: { | ||
build_url: buildUrl, | ||
exe_start_date: new Date().toISOString() | ||
}, | ||
testCaseId, | ||
testTitle: test.title | ||
} | ||
test.qTest = addTest(test.title, testCaseId, buildUrl) | ||
testResults.push(test.qTest) | ||
@@ -102,3 +95,3 @@ }, | ||
if (!qTestClient || !test.qTest) return | ||
if (!qTestClient || !test.qTest) { return } | ||
test.qTest.executionLog.status = statePassed | ||
@@ -112,3 +105,3 @@ }, | ||
if (!qTestClient || !test.qTest) return | ||
if (!qTestClient || !test.qTest) { return } | ||
@@ -128,3 +121,11 @@ test.qTest.executionLog.status = stateFailed | ||
if (!qTestClient || !test.qTest) return | ||
if (!qTestClient) { return } | ||
if (!test.qTest) { | ||
const testCaseId = getQTestId(test.title) | ||
if (!testCaseId) { return } | ||
test.qTest = addTest(test.title, testCaseId, buildUrl) | ||
testResults.push(test.qTest) | ||
} | ||
test.qTest.executionLog.status = statePending | ||
@@ -134,3 +135,3 @@ }, | ||
onTestEnd (test) { | ||
if (!qTestClient || !test.qTest) return | ||
if (!qTestClient || !test.qTest) { return } | ||
test.qTest.executionLog.exe_end_date = new Date().toISOString() | ||
@@ -143,3 +144,3 @@ if (!test.qTest.executionLog.status) { | ||
onSuiteStart (suite) { | ||
if (suite.root) return | ||
if (suite.root) { return } | ||
@@ -155,3 +156,3 @@ if (suite.parent && suite.parent.root) { | ||
onSuiteEnd (suite) { | ||
if (suite.root || !suite.parent || !suite.parent.root) return | ||
if (suite.root || !suite.parent || !suite.parent.root) { return } | ||
@@ -164,3 +165,3 @@ log(0, 'SUITE END', durationMsg(new Date() - suite.startDate), '\n') | ||
onHookStart (hook) { | ||
if (hook.title.includes('Global')) return | ||
if (hook.title.includes('Global')) { return } | ||
log(log.HOOK_PAD, `~ ${hook.title}`) | ||
@@ -170,3 +171,3 @@ }, | ||
onHookEnd (hook) { | ||
if (hook.title.includes('Global')) return | ||
if (hook.title.includes('Global')) { return } | ||
log(log.HOOK_PAD, `~ DONE`, durationMsg(hook.duration)) | ||
@@ -178,3 +179,3 @@ }, | ||
if (!qTestClient) return | ||
if (!qTestClient) { return } | ||
@@ -338,2 +339,13 @@ // submit first passed, then pending and failed tests in the end | ||
function addTest (testTitle, testCaseId, buildUrl) { | ||
return { | ||
executionLog: { | ||
build_url: buildUrl, | ||
exe_start_date: new Date().toISOString() | ||
}, | ||
testCaseId, | ||
testTitle | ||
} | ||
} | ||
/** | ||
@@ -340,0 +352,0 @@ * Expose `Mocha qTest Mapping Reporter`. |
{ | ||
"name": "mocha-qtest-mapping-reporter", | ||
"version": "1.0.9", | ||
"version": "1.1.0", | ||
"description": "Map your automated test to qTest Test Case with tag", | ||
@@ -25,3 +25,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"mocha": "^5.2.0", | ||
"mocha": "^6.0.2", | ||
"request": "^2.88.0", | ||
@@ -28,0 +28,0 @@ "request-promise-native": "^1.0.7" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19236
425
+ Addedansi-colors@3.2.3(transitive)
+ Addedansi-regex@3.0.14.1.1(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedargparse@1.0.10(transitive)
+ Addedarray-buffer-byte-length@1.0.1(transitive)
+ Addedarray.prototype.reduce@1.0.7(transitive)
+ Addedarraybuffer.prototype.slice@1.0.3(transitive)
+ Addedavailable-typed-arrays@1.0.7(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedcamelcase@5.3.1(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcliui@5.0.0(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addeddata-view-buffer@1.0.1(transitive)
+ Addeddata-view-byte-length@1.0.1(transitive)
+ Addeddata-view-byte-offset@1.0.0(transitive)
+ Addeddebug@3.2.6(transitive)
+ Addeddecamelize@1.2.0(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddefine-properties@1.2.1(transitive)
+ Addedemoji-regex@7.0.3(transitive)
+ Addedes-abstract@1.23.3(transitive)
+ Addedes-array-method-boxes-properly@1.0.0(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.0.0(transitive)
+ Addedes-set-tostringtag@2.0.3(transitive)
+ Addedes-to-primitive@1.2.1(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedfind-up@3.0.0(transitive)
+ Addedflat@4.1.1(transitive)
+ Addedfor-each@0.3.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedfunction.prototype.name@1.1.6(transitive)
+ Addedfunctions-have-names@1.2.3(transitive)
+ Addedget-caller-file@2.0.5(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedget-symbol-description@1.0.2(transitive)
+ Addedglob@7.1.3(transitive)
+ Addedglobalthis@1.0.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-bigints@1.0.2(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhe@1.2.0(transitive)
+ Addedinternal-slot@1.0.7(transitive)
+ Addedis-array-buffer@3.0.4(transitive)
+ Addedis-bigint@1.0.4(transitive)
+ Addedis-boolean-object@1.1.2(transitive)
+ Addedis-buffer@2.0.5(transitive)
+ Addedis-callable@1.2.7(transitive)
+ Addedis-data-view@1.0.1(transitive)
+ Addedis-date-object@1.0.5(transitive)
+ Addedis-fullwidth-code-point@2.0.0(transitive)
+ Addedis-negative-zero@2.0.3(transitive)
+ Addedis-number-object@1.0.7(transitive)
+ Addedis-regex@1.1.4(transitive)
+ Addedis-shared-array-buffer@1.0.3(transitive)
+ Addedis-string@1.0.7(transitive)
+ Addedis-symbol@1.0.4(transitive)
+ Addedis-typed-array@1.1.13(transitive)
+ Addedis-weakref@1.0.2(transitive)
+ Addedisarray@2.0.5(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjs-yaml@3.13.1(transitive)
+ Addedlocate-path@3.0.0(transitive)
+ Addedlog-symbols@2.2.0(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.4(transitive)
+ Addedmocha@6.2.3(transitive)
+ Addedms@2.1.1(transitive)
+ Addednode-environment-flags@1.0.5(transitive)
+ Addedobject-inspect@1.13.2(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedobject.assign@4.1.04.1.5(transitive)
+ Addedobject.getownpropertydescriptors@2.1.8(transitive)
+ Addedp-limit@2.3.0(transitive)
+ Addedp-locate@3.0.0(transitive)
+ Addedp-try@2.2.0(transitive)
+ Addedpath-exists@3.0.0(transitive)
+ Addedpossible-typed-array-names@1.0.0(transitive)
+ Addedregexp.prototype.flags@1.5.2(transitive)
+ Addedrequire-directory@2.1.1(transitive)
+ Addedrequire-main-filename@2.0.0(transitive)
+ Addedsafe-array-concat@1.1.2(transitive)
+ Addedsafe-regex-test@1.0.3(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedset-blocking@2.0.0(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedset-function-name@2.0.2(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedsprintf-js@1.0.3(transitive)
+ Addedstring-width@2.1.13.1.0(transitive)
+ Addedstring.prototype.trim@1.2.9(transitive)
+ Addedstring.prototype.trimend@1.0.8(transitive)
+ Addedstring.prototype.trimstart@1.0.8(transitive)
+ Addedstrip-ansi@4.0.05.2.0(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedsupports-color@5.5.06.0.0(transitive)
+ Addedtyped-array-buffer@1.0.2(transitive)
+ Addedtyped-array-byte-length@1.0.1(transitive)
+ Addedtyped-array-byte-offset@1.0.2(transitive)
+ Addedtyped-array-length@1.0.6(transitive)
+ Addedunbox-primitive@1.0.2(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedwhich-boxed-primitive@1.0.2(transitive)
+ Addedwhich-module@2.0.1(transitive)
+ Addedwhich-typed-array@1.1.15(transitive)
+ Addedwide-align@1.1.3(transitive)
+ Addedwrap-ansi@5.1.0(transitive)
+ Addedy18n@4.0.3(transitive)
+ Addedyargs@13.3.2(transitive)
+ Addedyargs-parser@13.1.2(transitive)
+ Addedyargs-unparser@1.6.0(transitive)
- Removedcommander@2.15.1(transitive)
- Removeddebug@3.1.0(transitive)
- Removedglob@7.1.2(transitive)
- Removedhe@1.1.1(transitive)
- Removedminimist@0.0.8(transitive)
- Removedmkdirp@0.5.1(transitive)
- Removedmocha@5.2.0(transitive)
- Removedms@2.0.0(transitive)
- Removedsupports-color@5.4.0(transitive)
Updatedmocha@^6.0.2