@bytedance/coverage-uploader
v1.0.1
Published
An e2e coverage suite for frontend.
Downloads
27
Readme
@bytedance/coverage-uploader
Desc
A sdk used to upload the code coverage info.
Usage
Insert the init code to your project entry as below:
import { createCoverageUploader, preReport } from '@bytedance/coverage-uploader',
const opt = {
url: ${your report url}, // 上报地址,
gitRepo: ${you gitrepo name},
// @ts-ignore,
preReport: preReport.qa('${your gitrepo name}', '${process.env.COMMIT_HASH}', filePath => (filePath.match(/\/${you repo suffix}\/(\\S+)/) || [])[1]),
interval: 5000,
retryLimit: 5,
},
const c = createCoverageUploader(opt);,
c.init();