mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-09 08:48:15 +01:00
16 lines
511 B
TypeScript
16 lines
511 B
TypeScript
import * as fixtures from './fixtures/utils';
|
|
import { prioritizeEndpoints } from '../../src/workers/utils';
|
|
|
|
describe('prioritizeEndpoints', () => {
|
|
it('prioritizeEndpoints', () => {
|
|
const { unsorted, sorted } = fixtures.endpoints;
|
|
const res = prioritizeEndpoints(unsorted);
|
|
const resFixed = [
|
|
...res.slice(0, 3).sort(),
|
|
...res.slice(3, 6).sort(),
|
|
...res.slice(6, 9).sort(),
|
|
];
|
|
expect(resFixed).toStrictEqual(sorted);
|
|
});
|
|
});
|