chore: fix typos (#19572)

This commit is contained in:
Martin Fischer 2023-06-26 15:10:27 +02:00 committed by GitHub
parent ad3c494b46
commit 801b9ec62d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
83 changed files with 169 additions and 168 deletions

View file

@ -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 });

View file

@ -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(),

View file

@ -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);

View file

@ -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;
},

View file

@ -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(() => {

View file

@ -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.

View file

@ -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;

View file

@ -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" },

View file

@ -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() {

View file

@ -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);
},
);