mirror of
https://github.com/denoland/deno.git
synced 2024-10-31 09:14:20 -04: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);
|
|
},
|
|
});
|