mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-21 17:32:41 +00:00
feat: layout url import
feat: backup import (except chords) feat: legacy layout import feat: separate layout, chord & setting backup downloads
This commit is contained in:
18
src/lib/backup/compat/legacy-layout.spec.ts
Normal file
18
src/lib/backup/compat/legacy-layout.spec.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import {describe, expect, it} from "vitest"
|
||||
import legacyLayout from "./legacy-layout.sample.csv?raw"
|
||||
import legacyLayoutConverted from "./legacy-layout-converted.sample.json"
|
||||
import {csvLayoutToJson, isCsvLayout} from "./legacy-layout"
|
||||
|
||||
describe("legacy layout", () => {
|
||||
it("should detect a legacy layout", () => {
|
||||
expect(isCsvLayout(legacyLayout)).to.be.true
|
||||
})
|
||||
|
||||
it("should not detect chord maps as layouts", () => {
|
||||
expect(isCsvLayout("e + h + t,the")).to.be.false
|
||||
})
|
||||
|
||||
it("should convert legacy layouts", () => {
|
||||
expect(csvLayoutToJson(legacyLayout)).to.deep.equal(legacyLayoutConverted)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user