diff --git a/packages/canyon-report/tests/baseFixtures.ts b/packages/canyon-report/tests/baseFixtures.ts index 2d9444ab..b0585035 100644 --- a/packages/canyon-report/tests/baseFixtures.ts +++ b/packages/canyon-report/tests/baseFixtures.ts @@ -14,7 +14,7 @@ export const test = baseTest.extend({ await fs.promises.mkdir(canyonOutputDirPath, {recursive: true}); await context.exposeFunction('collectIstanbulCoverage', (coverageJSON) => { if (coverageJSON) { - fs.writeFileSync(path.join(canyonOutputDirPath, `${new Date().valueOf()}.json`), JSON.stringify(coverageJSON)); + fs.writeFileSync(path.join(canyonOutputDirPath, `coverage-hit-${new Date().valueOf()}.json`), JSON.stringify(coverageJSON)); } }); await use(context); diff --git a/packages/canyon-report/tests/example.spec.ts b/packages/canyon-report/tests/example.spec.ts index 710ef6db..b3693573 100644 --- a/packages/canyon-report/tests/example.spec.ts +++ b/packages/canyon-report/tests/example.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from './baseFixtures'; test('has title', async ({ page }) => { - await page.goto('http://localhost:3000/login'); + await page.goto('https://report-component.canyonjs.org'); expect(await page.title()).toBe('Rsbuild App'); }); diff --git a/plugins/babel-plugin-canyon/package.json b/plugins/babel-plugin-canyon/package.json index dca1fe3d..7f4676b6 100644 --- a/plugins/babel-plugin-canyon/package.json +++ b/plugins/babel-plugin-canyon/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-canyon", - "version": "1.8.78-beta.24", + "version": "1.8.78-beta.25", "description": "A Babel plugin cooperates with istanbul to report the coverage", "author": "Allen Zhang ", "license": "MIT", diff --git a/plugins/babel-plugin-canyon/src/helpers/generate-initial-coverage.js b/plugins/babel-plugin-canyon/src/helpers/generate-initial-coverage.js index 0a2e57a1..0f488be5 100644 --- a/plugins/babel-plugin-canyon/src/helpers/generate-initial-coverage.js +++ b/plugins/babel-plugin-canyon/src/helpers/generate-initial-coverage.js @@ -12,7 +12,7 @@ export const generateInitialCoverage = (paramsPath) => { } // 防止返回的数据为空 if (initialCoverageDataForTheCurrentFile && initialCoverageDataForTheCurrentFile.path) { - fs.writeFileSync(`./.canyon_output/coverage-${Math.random()}.json`, JSON.stringify({ + fs.writeFileSync(`./.canyon_output/coverage-map-${Math.random()}.json`, JSON.stringify({ [initialCoverageDataForTheCurrentFile.path]: initialCoverageDataForTheCurrentFile }, null, 2), 'utf-8'); }