apple2js/test/js/formats/create_disk.spec.ts
Will Scullin 2daef8040f
Keep track of disk sides (#87)
Disk side information was being dropped and thus not displayable in the UI. This plumbs the value through various formats and adds some light testing.

Also fixes an issue where URL encoded hashes were not properly interpreted.
2021-10-02 11:45:09 -07:00

18 lines
513 B
TypeScript

import { createDiskFromJsonDisk } from 'js/formats/create_disk';
import { testDisk } from './testdata/json';
describe('createDiskFromJsonDisk', () => {
it('parses a JSON disk', () => {
const disk = createDiskFromJsonDisk(testDisk);
expect(disk).toEqual({
encoding: 'nibble',
format: 'dsk',
name: 'Test Disk',
readOnly: undefined,
side: 'Front',
volume: 254,
tracks: expect.any(Array)
});
});
});