Update rollup

With rollup's preserveModules option and the sideEffects flag in
package.json, now we have the power of tree shaking.
This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent dcad6ff922
commit 4209ea7fe8
4 changed files with 19 additions and 24 deletions

View File

@@ -3,17 +3,20 @@ import * as path from 'path';
import * as puppeteer from 'puppeteer';
import { assertSnapshot, launchPuppeteer } from './utils';
import { Suite } from 'mocha';
import { recordOptions } from '../src/types';
import { recordOptions, eventWithTime } from '../src/types';
interface ISuite extends Suite {
code: string;
browser: puppeteer.Browser;
}
describe('record integration tests', function(this: ISuite) {
describe('record integration tests', function (this: ISuite) {
this.timeout(10_000);
const getHtml = (fileName: string, options: recordOptions = {}): string => {
const getHtml = (
fileName: string,
options: recordOptions<eventWithTime> = {},
): string => {
const filePath = path.resolve(__dirname, `./html/${fileName}`);
const html = fs.readFileSync(filePath, 'utf8');
return html.replace(