mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-20 08:52:59 +00:00
19 lines
621 B
TypeScript
19 lines
621 B
TypeScript
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)
|
|
})
|
|
})
|