From cec82263c1299638b01ecc7a9b54aacb285f7fcb Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sun, 30 Sep 2018 11:14:44 -0400 Subject: [PATCH] Format --- js/dom_types.ts | 8 ++++---- js/fetch_test.ts | 23 +++++++++++++---------- website/app.js | 2 +- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/js/dom_types.ts b/js/dom_types.ts index e3f75e4886..d59f1165e3 100644 --- a/js/dom_types.ts +++ b/js/dom_types.ts @@ -103,8 +103,8 @@ export interface URLSearchParams { */ set(name: string, value: string): void; /** - * Sort all key/value pairs contained in this object in place - * and return undefined. The sort order is according to Unicode + * Sort all key/value pairs contained in this object in place + * and return undefined. The sort order is according to Unicode * code points of the keys. */ sort(): void; @@ -112,8 +112,8 @@ export interface URLSearchParams { * Returns a query string suitable for use in a URL. */ toString(): string; - /** - * Iterates over each name-value pair in the query + /** + * Iterates over each name-value pair in the query * and invokes the given function. */ forEach( diff --git a/js/fetch_test.ts b/js/fetch_test.ts index 9d76cb6ba4..7e2177350e 100644 --- a/js/fetch_test.ts +++ b/js/fetch_test.ts @@ -44,7 +44,7 @@ testPerm({ net: true }, async function fetchBlob() { assertEqual(blob.size, Number(headers.get("Content-Length"))); }); -// Logic heavily copied from web-platform-tests, make +// Logic heavily copied from web-platform-tests, make // sure pass mostly header basic test /* tslint:disable-next-line:max-line-length */ // ref: https://github.com/web-platform-tests/wpt/blob/7c50c216081d6ea3c9afe553ee7b64534020a1b2/fetch/api/headers/headers-basic.html @@ -68,17 +68,17 @@ test(function newHeaderTest() { }); const headerDict = { - "name1": "value1", - "name2": "value2", - "name3": "value3", - "name4": undefined, + name1: "value1", + name2: "value2", + name3: "value3", + name4: undefined, "Content-Type": "value4" }; const headerSeq = []; for (const name in headerDict) { headerSeq.push([name, headerDict[name]]); } - + test(function newHeaderWithSequence() { const headers = new Headers(headerSeq); for (const name in headerDict) { @@ -123,7 +123,10 @@ test(function headerHasSuccess() { for (const name in headerDict) { assert(headers.has(name), "headers has name " + name); /* tslint:disable-next-line:max-line-length */ - assert(!headers.has("nameNotInHeaders"), "headers do not have header: nameNotInHeaders"); + assert( + !headers.has("nameNotInHeaders"), + "headers do not have header: nameNotInHeaders" + ); } }); @@ -145,9 +148,9 @@ test(function headerGetSuccess() { }); const headerEntriesDict = { - "name1": "value1", - "Name2": "value2", - "name": "value3", + name1: "value1", + Name2: "value2", + name: "value3", "content-Type": "value4", "Content-Typ": "value5", "Content-Types": "value6" diff --git a/website/app.js b/website/app.js index 3281cd3cf7..da29797a86 100644 --- a/website/app.js +++ b/website/app.js @@ -148,7 +148,7 @@ export async function main() { categories: sha1List }, y: { - label: "seconds", + label: "seconds" } } });