Skip to content

Commit

Permalink
style: run deno fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Vehmloewff committed Jan 21, 2024
1 parent 4824079 commit 5f5650a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cbor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ Deno.test('cborDecode decodes what cborEncode encoded', () => {
asserts.assertEquals(cborDecode(cborEncode(null)), null)
})

Deno.test('cborDecode throws if it can\'t decode', () => {
Deno.test("cborDecode throws if it can't decode", () => {
asserts.assertThrows(() => cborDecode(new Uint8Array([12, 2, 55, 90, 123])))
})
4 changes: 2 additions & 2 deletions encryption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ const getAesAlgorithmData = (counter: Uint8Array): AesCtrParams => ({
})

const importAesKey = (keyData: ParsedSymmetricKey, usages: KeyUsage[]) => {
if (keyData.counterBytes.length !== 16) throw new Error('`key` is an invalid aes symmetric key. It doesn\'t have a 16 byte counter')
if (keyData.counterBytes.length !== 16) throw new Error("`key` is an invalid aes symmetric key. It doesn't have a 16 byte counter")
if (keyData.keyBytes.length !== 16) {
throw new Error('`key` is an invalid aes symmetric key. It doesn\'t have a 16 byte section for the true key')
throw new Error("`key` is an invalid aes symmetric key. It doesn't have a 16 byte section for the true key")
}

return crypto.subtle.importKey('raw', keyData.keyBytes, getAesAlgorithmData(keyData.counterBytes), false, usages)
Expand Down
2 changes: 1 addition & 1 deletion json.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Deno.test('jsonDecode decodes what jsonEncode encodes', () => {
asserts.assertEquals(jsonDecode(jsonEncode(null)), null)
})

Deno.test('jsonDecode throws if it can\'t decode', () => {
Deno.test("jsonDecode throws if it can't decode", () => {
asserts.assertThrows(() => jsonDecode('duh'))
asserts.assertThrows(() => jsonDecode(''))
asserts.assertThrows(() => jsonDecode('{ new: }'))
Expand Down
2 changes: 1 addition & 1 deletion safe_unknown.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { asserts } from './deps.ts'
import { SafeUnknown, SafeUnknownArray, SafeUnknownObject } from './safe_unknown.ts'
import { concatenate } from './string.ts'

Deno.test('SafeUnknown gets the correct type, and throws if it\'s the wrong type', () => {
Deno.test("SafeUnknown gets the correct type, and throws if it's the wrong type", () => {
interface TypeTest {
value: unknown
fn(safe: SafeUnknown): void
Expand Down
2 changes: 1 addition & 1 deletion sh.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { asserts } from './deps.ts'
import { execCaptureIncremental } from './sh.ts'

Deno.test('execCaptureIncremental doesn\'t fail or log anything extraneous', async () => {
Deno.test("execCaptureIncremental doesn't fail or log anything extraneous", async () => {
await execCaptureIncremental(['deno', 'run', 'sh.ts'], {
onErrorLine() {
throw new Error('There should never be any error lines')
Expand Down
2 changes: 1 addition & 1 deletion string.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Deno.test('concat and sliceConcatenated prevent delimiter attacks', () => {
asserts.assertEquals(sliceConcatenated(attackString), attackSections)
})

Deno.test('escaping and doing other funny stuff doesn\'t mess things up', () => {
Deno.test("escaping and doing other funny stuff doesn't mess things up", () => {
const sections = ['http:://', 'meeker 😂', 'bee\\/keeper']

asserts.assertEquals(sliceConcatenated(concatenate(sections)), sections)
Expand Down

0 comments on commit 5f5650a

Please sign in to comment.