apple2js/test/js/formats/util.spec.ts
Ian Flanigan 715ea6ffaa
ProDOS image format tests and fixes (#51)
Like the DOS 3.3 sector order issues in #49, this change fixes the
order of the physical sectors on the ProDOS disk when nibblized.

This change also adds tests similar to the DOS 3.3 tests to verify the
sector order.

Because the DOS 3.3 and ProDOS tests are so similar, the utility
methods have been refactored into their own file.
2021-01-03 14:59:42 -08:00

16 lines
402 B
TypeScript

import { compareSequences } from './util';
describe('compareSequences', () => {
it('matches at pos 0', () => {
expect(
compareSequences([0x01, 0x02, 0x03], [0x01, 0x02, 0x03], 0)
).toBeTruthy();
});
it('matches at pos 1', () => {
expect(
compareSequences([0x00, 0x01, 0x02, 0x03], [0x01, 0x02, 0x03], 1)
).toBeTruthy();
});
});