more serialization

This commit is contained in:
2023-07-08 16:05:49 +02:00
parent 1d7c573985
commit c771706353
5 changed files with 67 additions and 109 deletions

View File

@@ -2,8 +2,6 @@ import {describe, it, expect} from "vitest"
import {
chordAsCommandCompatible,
chordFromCommandCompatible,
chordsFromFile,
chordsToFile,
deserializeActions,
serializeActions,
} from "./chord"
@@ -41,16 +39,4 @@ describe("chords", function () {
})
})
})
describe("chl file format", function () {
const fileData: Chord[] = [
{phrase: [1, 2, 3, 4], actions: [5, 6, 7, 8, 9]},
{phrase: [10, 11], actions: [12, 13, 14, 15]},
{phrase: [16], actions: [17]},
]
it("should should convert back-forth a file", function () {
expect(chordsFromFile(chordsToFile(fileData))).toEqual(fileData)
})
})
})