Add junit reporting for canvas-rce

refs QA-614

Test Plan:
  - `yarn test` inside of packages/canvas-rce outputs
    `coverage/canvas-rce-junit.xml`
  - Also, Jenkins should pick that file up on patchset builds
    as well

Change-Id: Ib4db4ba16b90e181e17a319219544aa2f0c205ea
Reviewed-on: https://gerrit.instructure.com/172430
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
This commit is contained in:
Clay Diffrient 2018-11-14 13:57:04 -07:00
parent 0c24dd19b7
commit d30be21992
4 changed files with 33 additions and 4 deletions

View File

@ -88,7 +88,7 @@ module.exports = {
tests: { tests: {
options: { options: {
keepalive: false, keepalive: false,
port: 9443, port: 9219,
hostname: '*' hostname: '*'
} }
}, },

View File

@ -0,0 +1,8 @@
{
"reporterEnabled": "mocha-junit-reporter, spec",
"mochaJunitReporterReporterOptions": {
"mochaFile": "coverage/canvas-rce-junit.xml",
"testsuitesTitle": "Canvas RCE Mocha Tests",
"rootSuiteTitle": "Canvas RCE Mocha Tests"
}
}

View File

@ -9,7 +9,7 @@
"integration-test": "nightwatch --env integration", "integration-test": "nightwatch --env integration",
"lint": "eslint \"src/**/*.js\" \"test/**/*.js\"", "lint": "eslint \"src/**/*.js\" \"test/**/*.js\"",
"lint:fix": "eslint --fix \"src/**/*.js\" \"app/**/*.js\" \"test/**/*.js\" \"shared/**/*.js\"", "lint:fix": "eslint --fix \"src/**/*.js\" \"app/**/*.js\" \"test/**/*.js\" \"shared/**/*.js\"",
"test": "BABEL_ENV=test-node mocha 'test/**/*.test.js' --require @instructure/ui-themes/lib/canvas --compilers js:babel-core/register --timeout 5000", "test": "BABEL_ENV=test-node mocha 'test/**/*.test.js' --require @instructure/ui-themes/lib/canvas --compilers js:babel-core/register --timeout 5000 --reporter mocha-multi-reporters --reporter-options configFile=mocha-reporter-config.json",
"test:watch": "BABEL_ENV=test-node mocha 'test/**/*.test.js' --require @instructure/ui-themes/lib/canvas --compilers js:babel-core/register --watch", "test:watch": "BABEL_ENV=test-node mocha 'test/**/*.test.js' --require @instructure/ui-themes/lib/canvas --compilers js:babel-core/register --watch",
"test:coverage": "cross-env BABEL_ENV=test-node nyc -r html -r json node_modules/.bin/mocha -- 'test/**/*.test.js'", "test:coverage": "cross-env BABEL_ENV=test-node nyc -r html -r json node_modules/.bin/mocha -- 'test/**/*.test.js'",
"debug": "BABEL_ENV=test-node inspect _mocha --no-timeouts --debug-brk 'test/**/*.test.js' --require @instructure/ui-themes/lib/canvas --compilers js:babel-core/register", "debug": "BABEL_ENV=test-node inspect _mocha --no-timeouts --debug-brk 'test/**/*.test.js' --require @instructure/ui-themes/lib/canvas --compilers js:babel-core/register",
@ -173,6 +173,8 @@
"jsdomify": "^3", "jsdomify": "^3",
"mocha": "^5", "mocha": "^5",
"mocha-jsdom": "^2", "mocha-jsdom": "^2",
"mocha-junit-reporter": "^1.18.0",
"mocha-multi-reporters": "^1.1.7",
"nyc": "^12", "nyc": "^12",
"prettier": "^1.12.1", "prettier": "^1.12.1",
"proxyquire": "1.7.4", "proxyquire": "1.7.4",

View File

@ -11813,7 +11813,7 @@ md5.js@^1.3.4:
inherits "^2.0.1" inherits "^2.0.1"
safe-buffer "^5.1.2" safe-buffer "^5.1.2"
md5@^2.2.1: md5@^2.1.0, md5@^2.2.1:
version "2.2.1" version "2.2.1"
resolved "https://registry.yarnpkg.com/md5/-/md5-2.2.1.tgz#53ab38d5fe3c8891ba465329ea23fac0540126f9" resolved "https://registry.yarnpkg.com/md5/-/md5-2.2.1.tgz#53ab38d5fe3c8891ba465329ea23fac0540126f9"
integrity sha1-U6s41f48iJG6RlMp6iP6wFQBJvk= integrity sha1-U6s41f48iJG6RlMp6iP6wFQBJvk=
@ -12215,6 +12215,25 @@ mocha-jsdom@^2:
dependencies: dependencies:
jsdom "^11.11.0" jsdom "^11.11.0"
mocha-junit-reporter@^1.18.0:
version "1.18.0"
resolved "https://registry.yarnpkg.com/mocha-junit-reporter/-/mocha-junit-reporter-1.18.0.tgz#9209a3fba30025ae3ae5e6bfe7f9c5bc3c2e8ee2"
integrity sha512-y3XuqKa2+HRYtg0wYyhW/XsLm2Ps+pqf9HaTAt7+MVUAKFJaNAHOrNseTZo9KCxjfIbxUWwckP5qCDDPUmjSWA==
dependencies:
debug "^2.2.0"
md5 "^2.1.0"
mkdirp "~0.5.1"
strip-ansi "^4.0.0"
xml "^1.0.0"
mocha-multi-reporters@^1.1.7:
version "1.1.7"
resolved "https://registry.yarnpkg.com/mocha-multi-reporters/-/mocha-multi-reporters-1.1.7.tgz#cc7f3f4d32f478520941d852abb64d9988587d82"
integrity sha1-zH8/TTL0eFIJQdhSq7ZNmYhYfYI=
dependencies:
debug "^3.1.0"
lodash "^4.16.4"
mocha@^5: mocha@^5:
version "5.2.0" version "5.2.0"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6"
@ -18581,7 +18600,7 @@ xml-name-validator@^3.0.0:
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==
xml@^1.0.1: xml@^1.0.0, xml@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5"
integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU= integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=