chore: remove BigInt exists checks (#9744)
This commit is contained in:
parent
415da92300
commit
3db7d55d26
@ -72,7 +72,7 @@ export function valueFromRemoteObject(
|
||||
): any {
|
||||
assert(!remoteObject.objectId, 'Cannot extract value when objectId is given');
|
||||
if (remoteObject.unserializableValue) {
|
||||
if (remoteObject.type === 'bigint' && typeof BigInt !== 'undefined') {
|
||||
if (remoteObject.type === 'bigint') {
|
||||
return BigInt(remoteObject.unserializableValue.replace('n', ''));
|
||||
}
|
||||
switch (remoteObject.unserializableValue) {
|
||||
|
@ -23,8 +23,6 @@ import {
|
||||
} from './mocha-utils.js';
|
||||
import utils from './utils.js';
|
||||
|
||||
const bigint = typeof BigInt !== 'undefined';
|
||||
|
||||
describe('Evaluation specs', function () {
|
||||
setupTestBrowserHooks();
|
||||
setupTestPageAndContextHooks();
|
||||
@ -38,7 +36,7 @@ describe('Evaluation specs', function () {
|
||||
});
|
||||
expect(result).toBe(21);
|
||||
});
|
||||
(bigint ? it : it.skip)('should transfer BigInt', async () => {
|
||||
it('should transfer BigInt', async () => {
|
||||
const {page} = getTestState();
|
||||
|
||||
const result = await page.evaluate((a: bigint) => {
|
||||
@ -259,7 +257,7 @@ describe('Evaluation specs', function () {
|
||||
expect(result).not.toBe(object);
|
||||
expect(result).toEqual(object);
|
||||
});
|
||||
(bigint ? it : it.skip)('should return BigInt', async () => {
|
||||
it('should return BigInt', async () => {
|
||||
const {page} = getTestState();
|
||||
|
||||
const result = await page.evaluate(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user