chore: move unit tests (#10498)

This commit is contained in:
Nikolay Vitkov 2023-07-03 15:25:43 +02:00 committed by GitHub
parent d0d738d2fc
commit 0caf124182
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 6 deletions

View File

@ -34,7 +34,7 @@
"test:firefox:headful": "wireit", "test:firefox:headful": "wireit",
"test:firefox:headless": "wireit", "test:firefox:headless": "wireit",
"test:firefox": "wireit", "test:firefox": "wireit",
"test": "cross-env PUPPETEER_DEFERRED_PROMISE_DEBUG_TIMEOUT=20000 node tools/mochaRunner/lib/main.js --min-tests 1026", "test": "cross-env PUPPETEER_DEFERRED_PROMISE_DEBUG_TIMEOUT=20000 node tools/mochaRunner/lib/main.js --min-tests 1003",
"validate-licenses": "tsx tools/third_party/validate-licenses.ts", "validate-licenses": "tsx tools/third_party/validate-licenses.ts",
"unit": "npm run unit --workspaces --if-present" "unit": "npm run unit --workspaces --if-present"
}, },

View File

@ -14,15 +14,18 @@
* limitations under the License. * limitations under the License.
*/ */
import {describe, it} from 'node:test';
import expect from 'expect'; import expect from 'expect';
import {TimeoutError} from 'puppeteer';
import { import {
DeviceRequestPrompt, DeviceRequestPrompt,
DeviceRequestPromptDevice, DeviceRequestPromptDevice,
DeviceRequestPromptManager, DeviceRequestPromptManager,
} from 'puppeteer-core/internal/common/DeviceRequestPrompt.js'; } from './DeviceRequestPrompt.js';
import {EventEmitter} from 'puppeteer-core/internal/common/EventEmitter.js'; import {TimeoutError} from './Errors.js';
import {TimeoutSettings} from 'puppeteer-core/internal/common/TimeoutSettings.js'; import {EventEmitter} from './EventEmitter.js';
import {TimeoutSettings} from './TimeoutSettings.js';
class MockCDPSession extends EventEmitter { class MockCDPSession extends EventEmitter {
async send(): Promise<any> {} async send(): Promise<any> {}

View File

@ -14,8 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
import {describe, it} from 'node:test';
import expect from 'expect'; import expect from 'expect';
import {interpolateFunction} from 'puppeteer-core/internal/util/Function.js';
import {interpolateFunction} from './Function.js';
describe('Function', function () { describe('Function', function () {
describe('interpolateFunction', function () { describe('interpolateFunction', function () {