From 69858cfd7b917ac4cd67a9c0557a2c6d223e2d7f Mon Sep 17 00:00:00 2001 From: Yongjoon Lee <77270397+Binsk-dev@users.noreply.github.com> Date: Sat, 9 Nov 2024 22:15:09 +0900 Subject: [PATCH] test(bytes): fix typo in test description (#6179) --- bytes/index_of_needle_test.ts | 12 ++++++------ bytes/last_index_of_needle_test.ts | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bytes/index_of_needle_test.ts b/bytes/index_of_needle_test.ts index 5a2b92960..a452c6fbf 100644 --- a/bytes/index_of_needle_test.ts +++ b/bytes/index_of_needle_test.ts @@ -2,7 +2,7 @@ import { indexOfNeedle } from "./index_of_needle.ts"; import { assertEquals } from "@std/assert"; -Deno.test("indexOfNeedle() handles repeating occurence", () => { +Deno.test("indexOfNeedle() handles repeating occurrence", () => { const i = indexOfNeedle( new Uint8Array([1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 3]), new Uint8Array([0, 1, 2]), @@ -10,23 +10,23 @@ Deno.test("indexOfNeedle() handles repeating occurence", () => { assertEquals(i, 2); }); -Deno.test("indexOfNeedle() handles single occurence", () => { +Deno.test("indexOfNeedle() handles single occurrence", () => { const i = indexOfNeedle(new Uint8Array([0, 0, 1]), new Uint8Array([0, 1])); assertEquals(i, 1); }); -Deno.test("indexOfNeedle() handles text encoded occurence", () => { +Deno.test("indexOfNeedle() handles text encoded occurrence", () => { const encoder = new TextEncoder(); const i = indexOfNeedle(encoder.encode("Deno"), encoder.encode("D")); assertEquals(i, 0); }); -Deno.test("indexOfNeedle() handles missing occurence", () => { +Deno.test("indexOfNeedle() handles missing occurrence", () => { const i = indexOfNeedle(new Uint8Array(), new Uint8Array([0, 1])); assertEquals(i, -1); }); -Deno.test("indexOfNeedle() returns index of occurence after start", () => { +Deno.test("indexOfNeedle() returns index of occurrence after start", () => { const i = indexOfNeedle( new Uint8Array([0, 1, 2, 0, 1, 2]), new Uint8Array([0, 1]), @@ -35,7 +35,7 @@ Deno.test("indexOfNeedle() returns index of occurence after start", () => { assertEquals(i, 3); }); -Deno.test("indexOfNeedle() returns -1 if occurence is before start", () => { +Deno.test("indexOfNeedle() returns -1 if occurrence is before start", () => { const i = indexOfNeedle( new Uint8Array([0, 1, 2, 0, 1, 2]), new Uint8Array([0, 1]), diff --git a/bytes/last_index_of_needle_test.ts b/bytes/last_index_of_needle_test.ts index 8f085c857..5bb35c58f 100644 --- a/bytes/last_index_of_needle_test.ts +++ b/bytes/last_index_of_needle_test.ts @@ -2,7 +2,7 @@ import { assertEquals } from "@std/assert"; import { lastIndexOfNeedle } from "./last_index_of_needle.ts"; -Deno.test("lastIndexOfNeedle1() handles repeating occurence", () => { +Deno.test("lastIndexOfNeedle() handles repeating occurrence", () => { const i = lastIndexOfNeedle( new Uint8Array([0, 1, 2, 0, 1, 2, 0, 1, 3]), new Uint8Array([0, 1, 2]), @@ -10,7 +10,7 @@ Deno.test("lastIndexOfNeedle1() handles repeating occurence", () => { assertEquals(i, 3); }); -Deno.test("lastIndexOfNeedle() handles single occurence", () => { +Deno.test("lastIndexOfNeedle() handles single occurrence", () => { const i = lastIndexOfNeedle( new Uint8Array([0, 1, 1]), new Uint8Array([0, 1]), @@ -18,12 +18,12 @@ Deno.test("lastIndexOfNeedle() handles single occurence", () => { assertEquals(i, 0); }); -Deno.test("lastIndexOfNeedle() handles missing occurence", () => { +Deno.test("lastIndexOfNeedle() handles missing occurrence", () => { const i = lastIndexOfNeedle(new Uint8Array(), new Uint8Array([0, 1])); assertEquals(i, -1); }); -Deno.test("lastIndexOfNeedle() returns index of occurence after start", () => { +Deno.test("lastIndexOfNeedle() returns index of occurrence after start", () => { const i = lastIndexOfNeedle( new Uint8Array([0, 1, 2, 0, 1, 2]), new Uint8Array([0, 1]),