mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 07:44:48 -05:00
12 lines
380 B
TypeScript
12 lines
380 B
TypeScript
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
|
|
import { Buffer } from "node:buffer";
|
|
import { assertEquals } from "../../../test_util/std/testing/asserts.ts";
|
|
|
|
Deno.test({
|
|
name: "[node/buffer] slice with infinity returns empty buffer",
|
|
fn() {
|
|
const buf = Buffer.from([1, 2, 3, 4, 5]);
|
|
assertEquals(buf.slice(Infinity).length, 0);
|
|
},
|
|
});
|