/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
modules/benchmarks/src/largeform/largeform.perf-spec.ts
52 строки
1 KB
Kristiyan Kostadinov
build: initial test of TypeScript 6
16 янв 2026, 00:41
16 янв 2026, 00:41
d9c980a
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {runBenchmark, verifyNoBrowserErrors} from '../../../utilities/index.js'; import {$} from 'protractor'; interface Worker { id: string; prepare?(): void; work(): void; } const CreateAndDestroyWorker = { id: 'createDestroy', work: () => { $('#createDom').click(); $('#destroyDom').click(); }, }; describe('largeform benchmark spec', () => { afterEach(verifyNoBrowserErrors); [CreateAndDestroyWorker].forEach((worker) => { describe(worker.id, () => { it('should run for ng2', async () => { await runLargeFormBenchmark({url: '/', id: `largeform.ng2.${worker.id}`, worker: worker}); }); }); }); function runLargeFormBenchmark(config: { id: string; url: string; ignoreBrowserSynchronization?: boolean; worker: Worker; }) { return runBenchmark({ id: config.id, url: config.url, params: [{name: 'copies', value: 8}], ignoreBrowserSynchronization: config.ignoreBrowserSynchronization, prepare: config.worker.prepare, work: config.worker.work, }); } });