@webex/xunit-with-logs 2.60.1-next.9 → 2.60.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js.map +1 -1
- package/package.json +12 -13
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["util","require","fs","Base","utils","escape","mkdirp","path","_require","pick","exports","module","XUnit","runner","options","_apply","default","stats","tests","self","reporterOptions","output","createWriteStream","Error","sync","dirname","fileStream","on","test","push","logMethodNames","originalMethods","console","systemErr","systemOut","forEach","methodName","_len","arguments","length","args","Array","_key","callerInfo","stack","split","match","callerFile","relative","__dirname","unshift","concat","toUpperCase","write","tag","name","failures","errors","skipped","passes","timestamp","Date","toUTCString","time","duration","t","inherits","prototype","done","fn","end","line","log","testFn","attrs","classname","parent","fullTitle","title","cdata","reduce","reducer","state","err","failureMessage","message","pending","out","innerOut","arg","close","content","pairs","innerTag","_i","_Object$entries","_entries","_Object$entries$_i","_slicedToArray2","key","value","join","str"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n// These'll get cleaned up in the xunit PR; for now, they're just here because\n// this file attempted to follow the format of the mocha core xunit reporter\n/* eslint-disable no-console */\n/* eslint-disable no-multi-assign */\n\n/**\n * Module dependencies.\n */\n\nconst util = require('util');\nconst fs = require('fs');\n\nconst Base = require('mocha/lib/reporters/base');\nconst utils = require('mocha/lib/utils');\n\nconst {escape} = utils;\nconst mkdirp = require('mkdirp');\n\nconst path = require('path');\n\nconst {pick} = require('lodash');\n\n/**\n * Expose `XUnit`.\n */\n\nexports = module.exports = XUnit;\n\n/**\n * Initialize a new `XUnit` reporter.\n *\n * @param {Runner} runner\n * @param {Object} options\n * @returns {undefined}\n * @api public\n */\nfunction XUnit(runner, options) {\n Reflect.apply(Base, this, [runner]);\n const {stats} = this;\n const tests = [];\n const self = this;\n\n if (options.reporterOptions && options.reporterOptions.output) {\n if (!fs.createWriteStream) {\n throw new Error('file output not supported in browser');\n }\n mkdirp.sync(path.dirname(options.reporterOptions.output));\n self.fileStream = fs.createWriteStream(options.reporterOptions.output);\n }\n\n runner.on('pending', (test) => {\n tests.push(test);\n });\n\n runner.on('pass', (test) => {\n tests.push(test);\n });\n\n runner.on('fail', (test) => {\n tests.push(test);\n });\n\n const logMethodNames = ['error', 'warn', 'log', 'info', 'debug', 'trace'];\n const originalMethods = pick(console, logMethodNames);\n\n runner.on('test', (test) => {\n test.systemErr = [];\n test.systemOut = [];\n\n logMethodNames.forEach((methodName) => {\n if (!console[methodName]) {\n methodName = 'log';\n }\n\n console[methodName] = (...args) => {\n Reflect.apply(originalMethods[methodName], console, args);\n\n const callerInfo = new Error().stack.split('\\n')[2].match(/\\((.+?):(\\d+):\\d+/);\n\n if (callerInfo && callerInfo.length >= 2) {\n const callerFile = path.relative(__dirname, '..', callerInfo[1]);\n\n args.unshift(`(FILE:${callerFile || 'UNKNOWN'})`);\n args.unshift(`(LINE:${callerInfo[2] || 'UNKNOWN'})`);\n }\n\n if (methodName === 'error') {\n test.systemErr.push(args);\n } else {\n args.unshift(`${methodName.toUpperCase()}:`);\n\n test.systemOut.push(args);\n }\n };\n });\n });\n\n runner.on('test end', () => {\n logMethodNames.forEach((methodName) => {\n console[methodName] = originalMethods[methodName];\n });\n });\n\n runner.on('end', () => {\n self.write('<testsuites>');\n self.write(\n tag(\n 'testsuite',\n {\n name: 'Mocha Tests',\n tests: stats.tests,\n failures: stats.failures,\n errors: stats.failures,\n skipped: stats.tests - stats.failures - stats.passes,\n timestamp: new Date().toUTCString(),\n time: stats.duration / 1000 || 0,\n },\n false\n )\n );\n\n tests.forEach((t) => {\n self.test(t);\n });\n\n self.write('</testsuite>');\n self.write('</testsuites>');\n });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\nutil.inherits(XUnit, Base);\n\n/**\n * Override done to close the stream (if it's a file).\n *\n * @param {Array} failures\n * @param {Function} fn\n * @returns {undefined}\n */\nXUnit.prototype.done = function done(failures, fn) {\n if (this.fileStream) {\n this.fileStream.end(() => {\n fn(failures);\n });\n } else {\n fn(failures);\n }\n};\n\n/**\n * Write out the given line.\n *\n * @param {string} line\n * @returns {undefined}\n */\nXUnit.prototype.write = function write(line) {\n if (this.fileStream) {\n this.fileStream.write(`${line}\\n`);\n } else {\n console.log(line);\n }\n};\n\n/**\n * Output tag for the given `test.`\n *\n * @param {Test} test\n * @returns {undefined}\n */\nXUnit.prototype.test = function testFn(test) {\n const attrs = {\n classname: test.parent.fullTitle(),\n name: test.title,\n time: test.duration / 1000 || 0,\n };\n\n let systemErr;\n\n if (test.systemErr && test.systemErr.length > 0) {\n systemErr = tag('system-err', {}, false, cdata(test.systemErr.reduce(reducer, '\\n')));\n } else {\n systemErr = '';\n }\n\n let systemOut;\n\n if (test.systemOut && test.systemOut.length > 0) {\n systemOut = tag('system-out', {}, false, cdata(test.systemOut.reduce(reducer, '\\n')));\n } else {\n systemOut = '';\n }\n\n if (test.state === 'failed') {\n const {err} = test;\n const failureMessage = tag('failure', {}, false, cdata(`${escape(err.message)}\\n${err.stack}`));\n\n this.write(tag('testcase', attrs, false, failureMessage + systemOut + systemErr));\n } else if (test.pending) {\n this.write(tag('testcase', attrs, false, tag('skipped', {}, true)));\n } else {\n this.write(tag('testcase', attrs, true));\n }\n\n /**\n * reducer\n * @param {string} out\n * @param {Array<mixed>} args\n * @returns {string}\n * @private\n */\n function reducer(out, args) {\n return `${out + args.reduce((innerOut, arg) => `${innerOut + arg} `, '')}\\n`;\n }\n};\n\n/**\n * HTML tag helper.\n *\n * @param {string} name\n * @param {Object} attrs\n * @param {boolean} close\n * @param {string} content\n * @returns {string}\n */\nfunction tag(name, attrs, close, content) {\n const end = close ? '/>' : '>';\n const pairs = [];\n let innerTag;\n\n for (const [key, value] of Object.entries(attrs)) {\n pairs.push(`${key}=\"${escape(value)}\"`);\n }\n\n innerTag = `<${name}${pairs.length ? ` ${pairs.join(' ')}` : ''}${end}`;\n if (content) {\n innerTag += `${content}</${name}${end}`;\n }\n\n return innerTag;\n}\n\n/**\n * Return cdata escaped CDATA `str`.\n * @param {string} str\n * @returns {string}\n */\nfunction cdata(str) {\n return `<![CDATA[${escape(str)}]]>`;\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,IAAMA,IAAI,GAAGC,OAAO,CAAC,MAAM,CAAC;AAC5B,IAAMC,EAAE,GAAGD,OAAO,CAAC,IAAI,CAAC;AAExB,IAAME,IAAI,GAAGF,OAAO,CAAC,0BAA0B,CAAC;AAChD,IAAMG,KAAK,GAAGH,OAAO,CAAC,iBAAiB,CAAC;AAExC,IAAOI,MAAM,GAAID,KAAK,CAAfC,MAAM;AACb,IAAMC,MAAM,GAAGL,OAAO,CAAC,QAAQ,CAAC;AAEhC,IAAMM,IAAI,GAAGN,OAAO,CAAC,MAAM,CAAC;AAE5B,IAAAO,QAAA,GAAeP,OAAO,CAAC,QAAQ,CAAC;EAAzBQ,IAAI,GAAAD,QAAA,CAAJC,IAAI;;AAEX;AACA;AACA;;AAEAC,OAAO,GAAGC,MAAM,CAACD,OAAO,GAAGE,KAAK;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,KAAKA,CAACC,MAAM,EAAEC,OAAO,EAAE;EAC9B,IAAAC,MAAA,CAAAC,OAAA,EAAcb,IAAI,EAAE,IAAI,EAAE,CAACU,MAAM,CAAC,CAAC;EACnC,IAAOI,KAAK,GAAI,IAAI,CAAbA,KAAK;EACZ,IAAMC,KAAK,GAAG,EAAE;EAChB,IAAMC,IAAI,GAAG,IAAI;EAEjB,IAAIL,OAAO,CAACM,eAAe,IAAIN,OAAO,CAACM,eAAe,CAACC,MAAM,EAAE;IAC7D,IAAI,CAACnB,EAAE,CAACoB,iBAAiB,EAAE;MACzB,MAAM,IAAIC,KAAK,CAAC,sCAAsC,CAAC;IACzD;IACAjB,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OAAA,EAAe0D,KAAK,CAAC,EAAAoB,EAAA,GAAAC,eAAA,CAAAxD,MAAA,EAAAuD,EAAA,IAAE;IAA7C,IAAAG,kBAAA,OAAAC,eAAA,CAAAlF,OAAA,EAAA+E,eAAA,CAAAD,EAAA;MAAOK,GAAG,GAAAF,kBAAA;MAAEG,KAAK,GAAAH,kBAAA;IACpBL,KAAK,CAAC/D,IAAI,IAAAsB,MAAA,CAAIgD,GAAG,SAAAhD,MAAA,CAAK9C,MAAM,CAAC+F,KAAK,CAAC,OAAG,CAAC;EACzC;EAEAP,QAAQ,OAAA1C,MAAA,CAAOI,IAAI,EAAAJ,MAAA,CAAGyC,KAAK,CAACrD,MAAM,OAAAY,MAAA,CAAOyC,KAAK,CAACS,IAAI,CAAC,GAAG,CAAC,IAAK,EAAE,EAAAlD,MAAA,CAAGmB,GAAG,CAAE;EACvE,IAAIqB,OAAO,EAAE;IACXE,QAAQ,OAAA1C,MAAA,CAAOwC,OAAO,QAAAxC,MAAA,CAAKI,IAAI,EAAAJ,MAAA,CAAGmB,GAAG,CAAE;EACzC;EAEA,OAAOuB,QAAQ;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASd,KAAKA,CAACuB,GAAG,EAAE;EAClB,mBAAAnD,MAAA,CAAmB9C,MAAM,CAACiG,GAAG,CAAC;AAChC"}
|
|
1
|
+
{"version":3,"names":["util","require","fs","Base","utils","escape","mkdirp","path","_require","pick","exports","module","XUnit","runner","options","_apply","default","stats","tests","self","reporterOptions","output","createWriteStream","Error","sync","dirname","fileStream","on","test","push","logMethodNames","originalMethods","console","systemErr","systemOut","forEach","methodName","_len","arguments","length","args","Array","_key","callerInfo","stack","split","match","callerFile","relative","__dirname","unshift","concat","toUpperCase","write","tag","name","failures","errors","skipped","passes","timestamp","Date","toUTCString","time","duration","t","inherits","prototype","done","fn","end","line","log","testFn","attrs","classname","parent","fullTitle","title","cdata","reduce","reducer","state","err","failureMessage","message","pending","out","innerOut","arg","close","content","pairs","innerTag","_i","_Object$entries","_entries","_Object$entries$_i","_slicedToArray2","key","value","join","str"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n// These'll get cleaned up in the xunit PR; for now, they're just here because\n// this file attempted to follow the format of the mocha core xunit reporter\n/* eslint-disable no-console */\n/* eslint-disable no-multi-assign */\n\n/**\n * Module dependencies.\n */\n\nconst util = require('util');\nconst fs = require('fs');\n\nconst Base = require('mocha/lib/reporters/base');\nconst utils = require('mocha/lib/utils');\n\nconst {escape} = utils;\nconst mkdirp = require('mkdirp');\n\nconst path = require('path');\n\nconst {pick} = require('lodash');\n\n/**\n * Expose `XUnit`.\n */\n\nexports = module.exports = XUnit;\n\n/**\n * Initialize a new `XUnit` reporter.\n *\n * @param {Runner} runner\n * @param {Object} options\n * @returns {undefined}\n * @api public\n */\nfunction XUnit(runner, options) {\n Reflect.apply(Base, this, [runner]);\n const {stats} = this;\n const tests = [];\n const self = this;\n\n if (options.reporterOptions && options.reporterOptions.output) {\n if (!fs.createWriteStream) {\n throw new Error('file output not supported in browser');\n }\n mkdirp.sync(path.dirname(options.reporterOptions.output));\n self.fileStream = fs.createWriteStream(options.reporterOptions.output);\n }\n\n runner.on('pending', (test) => {\n tests.push(test);\n });\n\n runner.on('pass', (test) => {\n tests.push(test);\n });\n\n runner.on('fail', (test) => {\n tests.push(test);\n });\n\n const logMethodNames = ['error', 'warn', 'log', 'info', 'debug', 'trace'];\n const originalMethods = pick(console, logMethodNames);\n\n runner.on('test', (test) => {\n test.systemErr = [];\n test.systemOut = [];\n\n logMethodNames.forEach((methodName) => {\n if (!console[methodName]) {\n methodName = 'log';\n }\n\n console[methodName] = (...args) => {\n Reflect.apply(originalMethods[methodName], console, args);\n\n const callerInfo = new Error().stack.split('\\n')[2].match(/\\((.+?):(\\d+):\\d+/);\n\n if (callerInfo && callerInfo.length >= 2) {\n const callerFile = path.relative(__dirname, '..', callerInfo[1]);\n\n args.unshift(`(FILE:${callerFile || 'UNKNOWN'})`);\n args.unshift(`(LINE:${callerInfo[2] || 'UNKNOWN'})`);\n }\n\n if (methodName === 'error') {\n test.systemErr.push(args);\n } else {\n args.unshift(`${methodName.toUpperCase()}:`);\n\n test.systemOut.push(args);\n }\n };\n });\n });\n\n runner.on('test end', () => {\n logMethodNames.forEach((methodName) => {\n console[methodName] = originalMethods[methodName];\n });\n });\n\n runner.on('end', () => {\n self.write('<testsuites>');\n self.write(\n tag(\n 'testsuite',\n {\n name: 'Mocha Tests',\n tests: stats.tests,\n failures: stats.failures,\n errors: stats.failures,\n skipped: stats.tests - stats.failures - stats.passes,\n timestamp: new Date().toUTCString(),\n time: stats.duration / 1000 || 0,\n },\n false\n )\n );\n\n tests.forEach((t) => {\n self.test(t);\n });\n\n self.write('</testsuite>');\n self.write('</testsuites>');\n });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\nutil.inherits(XUnit, Base);\n\n/**\n * Override done to close the stream (if it's a file).\n *\n * @param {Array} failures\n * @param {Function} fn\n * @returns {undefined}\n */\nXUnit.prototype.done = function done(failures, fn) {\n if (this.fileStream) {\n this.fileStream.end(() => {\n fn(failures);\n });\n } else {\n fn(failures);\n }\n};\n\n/**\n * Write out the given line.\n *\n * @param {string} line\n * @returns {undefined}\n */\nXUnit.prototype.write = function write(line) {\n if (this.fileStream) {\n this.fileStream.write(`${line}\\n`);\n } else {\n console.log(line);\n }\n};\n\n/**\n * Output tag for the given `test.`\n *\n * @param {Test} test\n * @returns {undefined}\n */\nXUnit.prototype.test = function testFn(test) {\n const attrs = {\n classname: test.parent.fullTitle(),\n name: test.title,\n time: test.duration / 1000 || 0,\n };\n\n let systemErr;\n\n if (test.systemErr && test.systemErr.length > 0) {\n systemErr = tag('system-err', {}, false, cdata(test.systemErr.reduce(reducer, '\\n')));\n } else {\n systemErr = '';\n }\n\n let systemOut;\n\n if (test.systemOut && test.systemOut.length > 0) {\n systemOut = tag('system-out', {}, false, cdata(test.systemOut.reduce(reducer, '\\n')));\n } else {\n systemOut = '';\n }\n\n if (test.state === 'failed') {\n const {err} = test;\n const failureMessage = tag('failure', {}, false, cdata(`${escape(err.message)}\\n${err.stack}`));\n\n this.write(tag('testcase', attrs, false, failureMessage + systemOut + systemErr));\n } else if (test.pending) {\n this.write(tag('testcase', attrs, false, tag('skipped', {}, true)));\n } else {\n this.write(tag('testcase', attrs, true));\n }\n\n /**\n * reducer\n * @param {string} out\n * @param {Array<mixed>} args\n * @returns {string}\n * @private\n */\n function reducer(out, args) {\n return `${out + args.reduce((innerOut, arg) => `${innerOut + arg} `, '')}\\n`;\n }\n};\n\n/**\n * HTML tag helper.\n *\n * @param {string} name\n * @param {Object} attrs\n * @param {boolean} close\n * @param {string} content\n * @returns {string}\n */\nfunction tag(name, attrs, close, content) {\n const end = close ? '/>' : '>';\n const pairs = [];\n let innerTag;\n\n for (const [key, value] of Object.entries(attrs)) {\n pairs.push(`${key}=\"${escape(value)}\"`);\n }\n\n innerTag = `<${name}${pairs.length ? ` ${pairs.join(' ')}` : ''}${end}`;\n if (content) {\n innerTag += `${content}</${name}${end}`;\n }\n\n return innerTag;\n}\n\n/**\n * Return cdata escaped CDATA `str`.\n * @param {string} str\n * @returns {string}\n */\nfunction cdata(str) {\n return `<![CDATA[${escape(str)}]]>`;\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,IAAMA,IAAI,GAAGC,OAAO,CAAC,MAAM,CAAC;AAC5B,IAAMC,EAAE,GAAGD,OAAO,CAAC,IAAI,CAAC;AAExB,IAAME,IAAI,GAAGF,OAAO,CAAC,0BAA0B,CAAC;AAChD,IAAMG,KAAK,GAAGH,OAAO,CAAC,iBAAiB,CAAC;AAExC,IAAOI,MAAM,GAAID,KAAK,CAAfC,MAAM;AACb,IAAMC,MAAM,GAAGL,OAAO,CAAC,QAAQ,CAAC;AAEhC,IAAMM,IAAI,GAAGN,OAAO,CAAC,MAAM,CAAC;AA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EACzC;EAEA,OAAOuB,QAAQ;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASd,KAAKA,CAACuB,GAAG,EAAE;EAClB,mBAAAnD,MAAA,CAAmB9C,MAAM,CAACiG,GAAG,CAAC;AAChC"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/xunit-with-logs",
|
|
3
|
+
"version": "2.60.2",
|
|
3
4
|
"description": "",
|
|
4
5
|
"license": "MIT",
|
|
5
6
|
"main": "dist/index.js",
|
|
@@ -9,18 +10,18 @@
|
|
|
9
10
|
"directory": "packages/@webex/xunit-with-logs"
|
|
10
11
|
},
|
|
11
12
|
"engines": {
|
|
12
|
-
"node": ">=
|
|
13
|
+
"node": ">=14"
|
|
13
14
|
},
|
|
14
15
|
"devDependencies": {
|
|
15
16
|
"@babel/core": "^7.17.10",
|
|
16
|
-
"@webex/babel-config-legacy": "
|
|
17
|
-
"@webex/eslint-config-legacy": "
|
|
18
|
-
"@webex/jest-config-legacy": "
|
|
19
|
-
"@webex/legacy-tools": "
|
|
20
|
-
"@webex/test-helper-chai": "2.60.
|
|
21
|
-
"@webex/test-helper-mocha": "2.60.
|
|
22
|
-
"@webex/test-helper-mock-webex": "2.60.
|
|
23
|
-
"@webex/test-helper-test-users": "2.60.
|
|
17
|
+
"@webex/babel-config-legacy": "2.60.2",
|
|
18
|
+
"@webex/eslint-config-legacy": "2.60.2",
|
|
19
|
+
"@webex/jest-config-legacy": "2.60.2",
|
|
20
|
+
"@webex/legacy-tools": "2.60.2",
|
|
21
|
+
"@webex/test-helper-chai": "2.60.2",
|
|
22
|
+
"@webex/test-helper-mocha": "2.60.2",
|
|
23
|
+
"@webex/test-helper-mock-webex": "2.60.2",
|
|
24
|
+
"@webex/test-helper-test-users": "2.60.2",
|
|
24
25
|
"eslint": "^8.24.0",
|
|
25
26
|
"mocha": "10.0",
|
|
26
27
|
"prettier": "^2.7.1"
|
|
@@ -32,12 +33,10 @@
|
|
|
32
33
|
"scripts": {
|
|
33
34
|
"build": "yarn build:src",
|
|
34
35
|
"build:src": "webex-legacy-tools build -dest \"./dist\" -src \"./src\" -js -ts -maps",
|
|
35
|
-
"deploy:npm": "yarn npm publish",
|
|
36
36
|
"test": "yarn test:style && yarn test:unit && yarn test:integration && yarn test:browser",
|
|
37
37
|
"test:browser": "webex-legacy-tools test --integration --unit --runner karma",
|
|
38
38
|
"test:integration": "webex-legacy-tools test --integration --runner mocha",
|
|
39
39
|
"test:style": "eslint ./src/**/*.*",
|
|
40
40
|
"test:unit": "webex-legacy-tools test --unit --runner jest"
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
}
|
|
41
|
+
}
|
|
42
|
+
}
|