mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
2daef8040f
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.
18 lines
513 B
TypeScript
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)
|
|
});
|
|
});
|
|
});
|