mirror of
https://github.com/cupcakearmy/occulto.git
synced 2026-04-02 23:35:25 +00:00
2.0.0 (#3)
* rewrite * testing worklflow * sprcify version * config stuff * add hash as buffer * delete docs * use typedarray everywhere and docs * readme * aes * cleanup * rsa * testing with playwright * fix playwright * readme * docs * update deps * use headless * add prepublish * build pipeline * move types up * move types up * add types legacy * packaging * versions bump * cleanup * maybe this time * drop support for commonjs * version bump * cleanup
This commit is contained in:
16
test/encoding.spec.js
Normal file
16
test/encoding.spec.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Base64, Bytes } from '../dist/index.js'
|
||||
import { Precomputed } from './values.js'
|
||||
|
||||
describe('Encoding', () => {
|
||||
describe('Base64', () => {
|
||||
for (const [input, output] of Object.entries(Precomputed.Encoding.Base64)) {
|
||||
const buffer = Bytes.encode(input)
|
||||
it(`Should encode ${input} to ${output}`, async () => {
|
||||
chai.expect(await Base64.encode(buffer)).to.equal(output)
|
||||
})
|
||||
it(`Should decode ${output} to ${input}`, async () => {
|
||||
chai.expect(await Base64.decode(output)).to.deep.equal(buffer)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user