mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-20 17:03:42 +00:00
layout sharing via url
[deploy]
This commit is contained in:
12
src/lib/serialization/base64.spec.ts
Normal file
12
src/lib/serialization/base64.spec.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import {describe, it, expect} from "vitest"
|
||||
import {fromBase64, toBase64} from "./base64"
|
||||
|
||||
describe("base64", function () {
|
||||
const data = new Uint8Array([24, 235, 22, 67, 84, 73, 23, 77, 21])
|
||||
|
||||
it("should convert back-forth", async function () {
|
||||
expect(await fromBase64(await toBase64(new Blob([data]))).then(it => it.arrayBuffer())).toEqual(
|
||||
data.buffer,
|
||||
)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user