Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
d2l-test-reporting
Advanced tools
Readme
Helper package for generating reports for use with the D2L test reporting framework. This package is meant to be used in conjunction with this GitHub Action.
npm install d2l-test-reporting
This library provides a reporters for many of the test execution frameworks we use, if one for your test runner framework isn't provided please file an issue so we can look into adding it to our set of reporters.
Please consult the official documentation for Mocha to see how to use reporters. Below is an example of how to add the reporter provided by this package.
module.exports = {
spec: 'test/*.test.js',
reporter: 'd2l-test-reporting/reporters/mocha.cjs',
reporterOptions: [
'reportPath=./d2l-test-report.json', // optional
'reportConfigurationPath=./d2l-test-reporting.config.json' // optional
]
};
reportPath
: path to output the reporter to, relative to current working
directory. Not required. Defaults to ./d2l-test-report.json
.reportConfigurationPath
: path to the D2L test reporting configuration file
for mapping test type, experience and tool to test code. Not required.
Defaults to ./d2l-test-reporting.config.json
.Please consult the official documentation for Playwright to see how to use reporters. Below is an example of how to add the reporter provided by this package.
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
reporter: [
[
'd2l-test-reporting/reporters/playwright.js',
{
reportPath: './d2l-test-report.json', // optional
reportConfigurationPath: './d2l-test-reporting.config.json' // optional
}
],
['list']
],
testDir: '../',
testMatch: '*.test.js',
projects: [{
name: 'firefox',
use: devices['Desktop Firefox'],
testMatch: 'firefox/*.test.js'
}]
});
[!WARNING] Currently the
merge-reports
command is not fully supported due to a lack of browser/launcher information preservation with theblob
reporter. If you are using a GitHub matrix run this may result in partial data showing in the reporting dashboard as it becomes available.
reportPath
: path to output the reporter to, relative to current working
directory. Not required. Defaults to ./d2l-test-report.json
.reportConfigurationPath
: path to the D2L test reporting configuration file
for mapping test type, experience and tool to test code. Not required.
Defaults to ./d2l-test-reporting.config.json
.@web/test-runner
Please consult the official documentation for @web/test-runner
to see how
to use reporters. Below is an example of how to add the reporter provided by
this package.
import { defaultReporter } from '@web/test-runner';
import { reporter } from 'd2l-test-reporting/reporters/web-test-runner.js';
export default {
reporters: [
defaultReporter(),
reporter({
reportPath: './d2l-test-report.json', // optional
reportConfigurationPath: './d2l-test-reporting.config.json' // optional
})
],
files: 'test/component-*.test.js',
groups: [{
name: 'group',
files: 'test/group/component-*.test.js'
}]
};
reportPath
: path to output the reporter to, relative to current working
directory. Not required. Defaults to ./d2l-test-report.json
.reportConfigurationPath
: path to the D2L test reporting configuration file
for mapping test type, experience and tool to test code. Not required.
Defaults to ./d2l-test-reporting.config.json
.To have the test type, experience and tool mapped to test code, a D2L test reporting configuration file is required when using one of the reporters provided in this package.
Below are examples of how to create the config file. Note that the type
field
will end up lowercase in the report.
{
"type": "Visual Diff",
"experience": "Experience",
"tool": "Tool",
}
{
"type": "UI",
"overrides": [
{
"pattern": "tests/account-settings/**/*",
"experience": "Administration",
"tool": "Account Settings"
},
{
"pattern": "tests/announcements/**/*",
"experience": "Teaching & Learning",
"tool": "Announcements"
},
{
"pattern": "tests/rubrics.test.js",
"experience": "Assessment",
"tool": "Rubrics"
}
]
}
After cloning the repository make sure to install dependencies.
npm ci
# currently only eslint
npm run lint
# eslint only
npm run lint:eslint
# currently only eslint
npm run fix
# eslint only
npm run fix:eslint
# lint, unit tests and integration tests
npm test
# unit tests and integration tests only
npm run test:all
# unit tests only
npm run test:unit
# integration tests only
npm run test:integration
FAQs
Helper package for generating reports for use with the D2L test reporting framework
The npm package d2l-test-reporting receives a total of 680 weekly downloads. As such, d2l-test-reporting popularity was classified as not popular.
We found that d2l-test-reporting demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.