Skip to content

Commit

Permalink
fix: guard clone spec for buffer maxByteLength test failing in node 18
Browse files Browse the repository at this point in the history
  • Loading branch information
Thanga-Ganapathy committed Mar 27, 2024
1 parent 97a257f commit 646bb3a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/std/__tests__/object/clone.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { clone } from '../../src';

// const clone = structuredClone

// import { cloneDeep as clone } from 'lodash';

describe('Object > Clone', () => {
test('Primitives', () => {
expect(clone(undefined)).toBe(undefined);
Expand Down Expand Up @@ -161,7 +157,9 @@ describe('Object > Clone', () => {
expect(output).not.toBe(buffer);
expect(output).toEqual(buffer);
expect(buffer.byteLength).toBe(8);
expect(buffer.maxByteLength).toBe(16);
if (buffer.maxByteLength) {
expect(buffer.maxByteLength).toBe(16);
}
});

test('TypedArray', () => {
Expand Down

0 comments on commit 646bb3a

Please sign in to comment.