Socket
Socket
Sign inDemoInstall

mocha-qtest-mapping-reporter

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mocha-qtest-mapping-reporter - npm Package Compare versions

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"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc