From 1f0dc4f3a311a16ac4da14122a8d0ad68d8c5696 Mon Sep 17 00:00:00 2001 From: Nikolay Vitkov <34244704+Lightning00Blade@users.noreply.github.com> Date: Wed, 28 Jun 2023 13:36:26 +0200 Subject: [PATCH] refactor: move EventEmitter tests (#10463) --- package.json | 2 +- .../puppeteer-core/src/common/EventEmitter.test.ts | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) rename test/src/EventEmitter.spec.ts => packages/puppeteer-core/src/common/EventEmitter.test.ts (97%) diff --git a/package.json b/package.json index f95c96c7434..419513a01af 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "test:firefox:headful": "wireit", "test:firefox:headless": "wireit", "test:firefox": "wireit", - "test": "cross-env PUPPETEER_DEFERRED_PROMISE_DEBUG_TIMEOUT=20000 node tools/mochaRunner/lib/main.js --min-tests 1046", + "test": "cross-env PUPPETEER_DEFERRED_PROMISE_DEBUG_TIMEOUT=20000 node tools/mochaRunner/lib/main.js --min-tests 1026", "validate-licenses": "tsx tools/third_party/validate-licenses.ts", "unit": "npm run unit --workspaces --if-present" }, diff --git a/test/src/EventEmitter.spec.ts b/packages/puppeteer-core/src/common/EventEmitter.test.ts similarity index 97% rename from test/src/EventEmitter.spec.ts rename to packages/puppeteer-core/src/common/EventEmitter.test.ts index ef5a6cc0650..c96a104718b 100644 --- a/test/src/EventEmitter.spec.ts +++ b/packages/puppeteer-core/src/common/EventEmitter.test.ts @@ -1,5 +1,5 @@ /** - * Copyright 2020 Google Inc. All rights reserved. + * Copyright 2023 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,10 +14,13 @@ * limitations under the License. */ +import {describe, it, beforeEach} from 'node:test'; + import expect from 'expect'; -import {EventEmitter} from 'puppeteer-core/internal/common/EventEmitter.js'; import sinon from 'sinon'; +import {EventEmitter} from './EventEmitter.js'; + describe('EventEmitter', () => { let emitter: EventEmitter;