Skip to content

Commit 0a1ef65

Browse files
authored
chore: move to eslint and prettier for tests (#312)
Now that all the source files have been updated, and verified with the old tests update the tests. This process helps ensure that all changes are **only** formatting.
1 parent bf15b3a commit 0a1ef65

File tree

71 files changed

+24494
-3089
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+24494
-3089
lines changed

modules/cache-material/test/build_cryptographic_materials_cache_key_helpers.test.ts

+12-6
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,27 @@
55

66
import { expect } from 'chai'
77
import { buildCryptographicMaterialsCacheKeyHelpers } from '../src/build_cryptographic_materials_cache_key_helpers'
8-
import { encryptionContextVectors, encryptedDataKeyVectors, encryptCacheKeyVectors, decryptCacheKeyVectors } from './fixtures'
8+
import {
9+
encryptionContextVectors,
10+
encryptedDataKeyVectors,
11+
encryptCacheKeyVectors,
12+
decryptCacheKeyVectors,
13+
} from './fixtures'
914
import { createHash } from 'crypto'
1015

1116
const fromUtf8 = (input: string) => Buffer.from(input, 'utf8')
1217
const toUtf8 = (input: Uint8Array) => Buffer.from(input).toString('utf8')
13-
const sha512 = async (...data: (Uint8Array|string)[]) => data
14-
.map(item => typeof item === 'string' ? Buffer.from(item, 'hex') : item)
15-
.reduce((hash, item) => hash.update(item), createHash('sha512'))
16-
.digest()
18+
const sha512 = async (...data: (Uint8Array | string)[]) =>
19+
data
20+
.map((item) => (typeof item === 'string' ? Buffer.from(item, 'hex') : item))
21+
.reduce((hash, item) => hash.update(item), createHash('sha512'))
22+
.digest()
1723

1824
const {
1925
encryptionContextHash,
2026
encryptedDataKeysHash,
2127
buildEncryptionMaterialCacheKey,
22-
buildDecryptionMaterialCacheKey
28+
buildDecryptionMaterialCacheKey,
2329
} = buildCryptographicMaterialsCacheKeyHelpers(fromUtf8, toUtf8, sha512)
2430

2531
describe('buildCryptographicMaterialsCacheKeyHelpers::encryptionContextHash', () => {

0 commit comments

Comments
 (0)