diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/integration/lsp_tests.rs | 8 | ||||
-rw-r--r-- | cli/tests/integration/run_tests.rs | 2 | ||||
-rw-r--r-- | cli/tests/unit/chown_test.ts | 6 | ||||
-rw-r--r-- | cli/tests/unit/command_test.ts | 2 | ||||
-rw-r--r-- | cli/tests/unit/console_test.ts | 6 | ||||
-rw-r--r-- | cli/tests/unit/fetch_test.ts | 4 | ||||
-rw-r--r-- | cli/tests/unit/ffi_test.ts | 4 | ||||
-rw-r--r-- | cli/tests/unit/fs_events_test.ts | 6 | ||||
-rw-r--r-- | cli/tests/unit/kv_test.ts | 4 | ||||
-rw-r--r-- | cli/tests/unit/serve_test.ts | 12 | ||||
-rw-r--r-- | cli/tests/unit/text_encoding_test.ts | 6 | ||||
-rw-r--r-- | cli/tests/unit/url_search_params_test.ts | 8 | ||||
-rw-r--r-- | cli/tests/unit_node/buffer_test.ts | 2 | ||||
-rw-r--r-- | cli/tests/unit_node/http_test.ts | 2 | ||||
-rw-r--r-- | cli/tests/unit_node/worker_threads_test.ts | 4 |
15 files changed, 38 insertions, 38 deletions
diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs index 71a3d541f..04b17ef00 100644 --- a/cli/tests/integration/lsp_tests.rs +++ b/cli/tests/integration/lsp_tests.rs @@ -1325,7 +1325,7 @@ fn lsp_hover_change_mbc() { "end": { "line": 1, // the LSP uses utf16 encoded characters indexes, so - // after the deno emoiji is character index 15 + // after the deno emoji is character index 15 "character": 15 } }, @@ -2088,7 +2088,7 @@ fn lsp_document_symbol() { "uri": "file:///a/file.ts", "languageId": "typescript", "version": 1, - "text": "interface IFoo {\n foo(): boolean;\n}\n\nclass Bar implements IFoo {\n constructor(public x: number) { }\n foo() { return true; }\n /** @deprecated */\n baz() { return false; }\n get value(): number { return 0; }\n set value(newVavlue: number) { return; }\n static staticBar = new Bar(0);\n private static getStaticBar() { return Bar.staticBar; }\n}\n\nenum Values { value1, value2 }\n\nvar bar: IFoo = new Bar(3);" + "text": "interface IFoo {\n foo(): boolean;\n}\n\nclass Bar implements IFoo {\n constructor(public x: number) { }\n foo() { return true; }\n /** @deprecated */\n baz() { return false; }\n get value(): number { return 0; }\n set value(_newValue: number) { return; }\n static staticBar = new Bar(0);\n private static getStaticBar() { return Bar.staticBar; }\n}\n\nenum Values { value1, value2 }\n\nvar bar: IFoo = new Bar(3);" } }), ); @@ -3114,7 +3114,7 @@ fn lsp_code_lens_test_disabled() { "text": "const { test } = Deno;\nconst { test: test2 } = Deno;\nconst test3 = Deno.test;\n\nDeno.test(\"test a\", () => {});\nDeno.test({\n name: \"test b\",\n fn() {},\n});\ntest({\n name: \"test c\",\n fn() {},\n});\ntest(\"test d\", () => {});\ntest2({\n name: \"test e\",\n fn() {},\n});\ntest2(\"test f\", () => {});\ntest3({\n name: \"test g\",\n fn() {},\n});\ntest3(\"test h\", () => {});\n" } }), - // diable test code lens + // disable test code lens json!([{ "enable": true, "codeLens": { @@ -7373,7 +7373,7 @@ Deno.test({ .as_str() .unwrap(); // deno test's output capturing flushes with a zero-width space in order to - // synchronize the output pipes. Occassionally this zero width space + // synchronize the output pipes. Occasionally this zero width space // might end up in the output so strip it from the output comparison here. assert_eq!(notification_value.replace('\u{200B}', ""), "test a\r\n"); assert_eq!( diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 476849b2a..b4171e4a2 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -2466,7 +2466,7 @@ mod permissions { #[test] fn net_listen_allow_localhost() { - // Port 4600 is chosen to not colide with those used by + // Port 4600 is chosen to not collide with those used by // target/debug/test_server let (_, err) = util::run_and_collect_output( true, diff --git a/cli/tests/unit/chown_test.ts b/cli/tests/unit/chown_test.ts index 17dc76491..f37f26e09 100644 --- a/cli/tests/unit/chown_test.ts +++ b/cli/tests/unit/chown_test.ts @@ -105,7 +105,7 @@ Deno.test( }, async function chownSyncSucceed() { // TODO(bartlomieju): when a file's owner is actually being changed, - // chown only succeeds if run under priviledged user (root) + // chown only succeeds if run under privileged user (root) // The test script has no such privilege, so need to find a better way to test this case const { uid, gid } = await getUidAndGid(); @@ -114,7 +114,7 @@ Deno.test( Deno.writeTextFileSync(filePath, "Hello"); // the test script creates this file with the same uid and gid, - // here chown is a noop so it succeeds under non-priviledged user + // here chown is a noop so it succeeds under non-privileged user Deno.chownSync(filePath, uid, gid); Deno.removeSync(dirPath, { recursive: true }); @@ -182,7 +182,7 @@ Deno.test( await Deno.writeFile(fileUrl, fileData); // the test script creates this file with the same uid and gid, - // here chown is a noop so it succeeds under non-priviledged user + // here chown is a noop so it succeeds under non-privileged user await Deno.chown(fileUrl, uid, gid); Deno.removeSync(dirPath, { recursive: true }); diff --git a/cli/tests/unit/command_test.ts b/cli/tests/unit/command_test.ts index 198f94aed..2e73869a9 100644 --- a/cli/tests/unit/command_test.ts +++ b/cli/tests/unit/command_test.ts @@ -797,7 +797,7 @@ setInterval(() => { Deno.writeFileSync(`${cwd}/${programFile}`, enc.encode(program)); Deno.writeFileSync(`${cwd}/${childProgramFile}`, enc.encode(childProgram)); // In this subprocess we are spawning another subprocess which has - // an infite interval set. Following call would never resolve unless + // an infinite interval set. Following call would never resolve unless // child process gets unrefed. const { success, stdout, stderr } = await new Deno.Command( Deno.execPath(), diff --git a/cli/tests/unit/console_test.ts b/cli/tests/unit/console_test.ts index 4cedf3584..8543541af 100644 --- a/cli/tests/unit/console_test.ts +++ b/cli/tests/unit/console_test.ts @@ -3,7 +3,7 @@ // TODO(ry) The unit test functions in this module are too coarse. They should // be broken up into smaller bits. -// TODO(ry) These tests currentl strip all the ANSI colors out. We don't have a +// TODO(ry) These tests currently strip all the ANSI colors out. We don't have a // good way to control whether we produce color output or not since // std/fmt/colors auto determines whether to put colors in or not. We need // better infrastructure here so we can properly test the colors. @@ -1069,7 +1069,7 @@ Deno.test(function consoleTestWithCustomInspectorError() { () => stringify(a), Error, "BOOM", - "Inpsect should fail and maintain a clear CTX_STACK", + "Inspect should fail and maintain a clear CTX_STACK", ); }); @@ -1779,7 +1779,7 @@ Deno.test(function consoleLogShouldNotThrowErrorWhenInvalidCssColorsAreGiven() { }); // console.log(Invalid Date) test -Deno.test(function consoleLogShoultNotThrowErrorWhenInvalidDateIsPassed() { +Deno.test(function consoleLogShouldNotThrowErrorWhenInvalidDateIsPassed() { mockConsole((console, out) => { const invalidDate = new Date("test"); console.log(invalidDate); diff --git a/cli/tests/unit/fetch_test.ts b/cli/tests/unit/fetch_test.ts index db553f14d..e89abef30 100644 --- a/cli/tests/unit/fetch_test.ts +++ b/cli/tests/unit/fetch_test.ts @@ -1270,9 +1270,9 @@ Deno.test( }, 1000); }, }); - const nonExistantHostname = "http://localhost:47582"; + const nonExistentHostname = "http://localhost:47582"; await assertRejects(async () => { - await fetch(nonExistantHostname, { body, method: "POST" }); + await fetch(nonExistentHostname, { body, method: "POST" }); }, TypeError); await done; }, diff --git a/cli/tests/unit/ffi_test.ts b/cli/tests/unit/ffi_test.ts index 65b257774..c5961c6fb 100644 --- a/cli/tests/unit/ffi_test.ts +++ b/cli/tests/unit/ffi_test.ts @@ -29,7 +29,7 @@ Deno.test({ permissions: { ffi: false } }, function ffiPermissionDenied() { Deno.dlopen("/usr/lib/libc.so.6", {}); }, Deno.errors.PermissionDenied); const fnptr = new Deno.UnsafeFnPointer( - // @ts-expect-error: Not NonNullable but null check is after premissions check. + // @ts-expect-error: Not NonNullable but null check is after permissions check. null, { parameters: ["u32", "pointer"], @@ -43,7 +43,7 @@ Deno.test({ permissions: { ffi: false } }, function ffiPermissionDenied() { Deno.UnsafePointer.of(new Uint8Array(0)); }, Deno.errors.PermissionDenied); const ptrView = new Deno.UnsafePointerView( - // @ts-expect-error: Not NonNullable but null check is after premissions check. + // @ts-expect-error: Not NonNullable but null check is after permissions check. null, ); assertThrows(() => { diff --git a/cli/tests/unit/fs_events_test.ts b/cli/tests/unit/fs_events_test.ts index cdfb67657..9330f2007 100644 --- a/cli/tests/unit/fs_events_test.ts +++ b/cli/tests/unit/fs_events_test.ts @@ -14,14 +14,14 @@ Deno.test({ permissions: { read: true } }, function watchFsInvalidPath() { if (Deno.build.os === "windows") { assertThrows( () => { - Deno.watchFs("non-existant.file"); + Deno.watchFs("non-existent.file"); }, Error, "Input watch path is neither a file nor a directory", ); } else { assertThrows(() => { - Deno.watchFs("non-existant.file"); + Deno.watchFs("non-existent.file"); }, Deno.errors.NotFound); } }); @@ -51,7 +51,7 @@ Deno.test( const testDir = await makeTempDir(); const iter = Deno.watchFs(testDir); - // Asynchornously capture two fs events. + // Asynchronously capture two fs events. const eventsPromise = getTwoEvents(iter); // Make some random file system activity. diff --git a/cli/tests/unit/kv_test.ts b/cli/tests/unit/kv_test.ts index 5ed0bc644..e7642fef0 100644 --- a/cli/tests/unit/kv_test.ts +++ b/cli/tests/unit/kv_test.ts @@ -1662,7 +1662,7 @@ Deno.test({ await db.enqueue("msg2"); await promise; - // Close the database and wait for the listerner to finish. + // Close the database and wait for the listener to finish. db.close(); await listener; @@ -1718,7 +1718,7 @@ Deno.test({ await db.enqueue("msg1", { delay: 10000 }); await db.enqueue("msg2", { delay: 10000 }); - // Close the database and wait for the listerner to finish. + // Close the database and wait for the listener to finish. db.close(); await listener; diff --git a/cli/tests/unit/serve_test.ts b/cli/tests/unit/serve_test.ts index cfc2710f6..8ab5209df 100644 --- a/cli/tests/unit/serve_test.ts +++ b/cli/tests/unit/serve_test.ts @@ -2153,16 +2153,16 @@ const compressionTestCases = [ // out: { "Content-Type": "text/plain" }, // expect: null, // }, - { name: "Uncompressible", length: 1024, in: {}, out: {}, expect: null }, + { name: "Incompressible", length: 1024, in: {}, out: {}, expect: null }, { - name: "UncompressibleAcceptGzip", + name: "IncompressibleAcceptGzip", length: 1024, in: { "Accept-Encoding": "gzip" }, out: {}, expect: null, }, { - name: "UncompressibleType", + name: "IncompressibleType", length: 1024, in: { "Accept-Encoding": "gzip" }, out: { "Content-Type": "text/fake" }, @@ -2190,21 +2190,21 @@ const compressionTestCases = [ expect: "br", }, { - name: "UncompressibleRange", + name: "IncompressibleRange", length: 1024, in: { "Accept-Encoding": "gzip" }, out: { "Content-Type": "text/plain", "Content-Range": "1" }, expect: null, }, { - name: "UncompressibleCE", + name: "IncompressibleCE", length: 1024, in: { "Accept-Encoding": "gzip" }, out: { "Content-Type": "text/plain", "Content-Encoding": "random" }, expect: null, }, { - name: "UncompressibleCC", + name: "IncompressibleCC", length: 1024, in: { "Accept-Encoding": "gzip" }, out: { "Content-Type": "text/plain", "Cache-Control": "no-transform" }, diff --git a/cli/tests/unit/text_encoding_test.ts b/cli/tests/unit/text_encoding_test.ts index 940dd9f74..b76e9a9bf 100644 --- a/cli/tests/unit/text_encoding_test.ts +++ b/cli/tests/unit/text_encoding_test.ts @@ -250,17 +250,17 @@ Deno.test(function toStringShouldBeWebCompatibility() { Deno.test(function textEncoderShouldCoerceToString() { const encoder = new TextEncoder(); - const fixutreText = "text"; + const fixtureText = "text"; const fixture = { toString() { - return fixutreText; + return fixtureText; }, }; const bytes = encoder.encode(fixture as unknown as string); const decoder = new TextDecoder(); const decoded = decoder.decode(bytes); - assertEquals(decoded, fixutreText); + assertEquals(decoded, fixtureText); }); Deno.test(function binaryEncode() { diff --git a/cli/tests/unit/url_search_params_test.ts b/cli/tests/unit/url_search_params_test.ts index 9eead890c..8eb0f774d 100644 --- a/cli/tests/unit/url_search_params_test.ts +++ b/cli/tests/unit/url_search_params_test.ts @@ -23,7 +23,7 @@ Deno.test(function urlSearchParamsWithQuotes() { assertEquals(searchParams, "str=%27hello+world%27"); }); -Deno.test(function urlSearchParamsWithBraket() { +Deno.test(function urlSearchParamsWithBracket() { const init = [ ["str", "(hello world)"], ]; @@ -328,10 +328,10 @@ Deno.test( // If a class extends URLSearchParams, override one method should not change another's behavior. Deno.test( function urlSearchParamsOverridingAppendNotChangeConstructorAndSet() { - let overridedAppendCalled = 0; + let overriddenAppendCalled = 0; class CustomSearchParams extends URLSearchParams { append(name: string, value: string) { - ++overridedAppendCalled; + ++overriddenAppendCalled; super.append(name, value); } } @@ -339,7 +339,7 @@ Deno.test( new CustomSearchParams([["foo", "bar"]]); new CustomSearchParams(new CustomSearchParams({ foo: "bar" })); new CustomSearchParams().set("foo", "bar"); - assertEquals(overridedAppendCalled, 0); + assertEquals(overriddenAppendCalled, 0); }, ); diff --git a/cli/tests/unit_node/buffer_test.ts b/cli/tests/unit_node/buffer_test.ts index 74415d0d5..5244764c6 100644 --- a/cli/tests/unit_node/buffer_test.ts +++ b/cli/tests/unit_node/buffer_test.ts @@ -215,7 +215,7 @@ Deno.test({ assertEquals( Buffer.byteLength(Buffer.alloc(0)), Buffer.alloc(0).byteLength, - "Byte lenght differs on buffers", + "Byte length differs on buffers", ); }, }); diff --git a/cli/tests/unit_node/http_test.ts b/cli/tests/unit_node/http_test.ts index d54368003..2a2203e05 100644 --- a/cli/tests/unit_node/http_test.ts +++ b/cli/tests/unit_node/http_test.ts @@ -288,7 +288,7 @@ Deno.test("[node/http] non-string buffer response", { }); // TODO(kt3k): Enable this test -// Currently ImcomingMessage constructor has incompatible signature. +// Currently IncomingMessage constructor has incompatible signature. /* Deno.test("[node/http] http.IncomingMessage can be created without url", () => { const message = new http.IncomingMessage( diff --git a/cli/tests/unit_node/worker_threads_test.ts b/cli/tests/unit_node/worker_threads_test.ts index c46df057e..a43a1b506 100644 --- a/cli/tests/unit_node/worker_threads_test.ts +++ b/cli/tests/unit_node/worker_threads_test.ts @@ -103,7 +103,7 @@ Deno.test({ worker.postMessage("Hello, how are you my thread?"); assertEquals((await once(worker, "message"))[0], "I'm fine!"); const data = (await once(worker, "message"))[0]; - // data.threadId can be 1 when this test is runned individually + // data.threadId can be 1 when this test is run individually if (data.threadId === 1) data.threadId = 3; assertObjectMatch(data, { isMainThread: false, @@ -144,7 +144,7 @@ Deno.test({ }); Deno.test({ - name: "[worker_threads] inheritences", + name: "[worker_threads] inheritances", async fn() { const worker = new workerThreads.Worker( ` |