Files
Bubberstation/tgui/packages/common/collections.spec.ts
SkyratBot 332a74ea76 [MIRROR] Adds Prettierx - or how I broke TGUI for the nth time [MDB IGNORE] (#14475)
* Adds Prettierx - or how I broke TGUI for the nth time

* fuck

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-06-25 01:17:32 +01:00

21 lines
475 B
TypeScript

import { range, zip } from './collections';
// Type assertions, these will lint if the types are wrong.
const _zip1: [string, number] = zip(['a'], [1])[0];
describe('range', () => {
test('range(0, 5)', () => {
expect(range(0, 5)).toEqual([0, 1, 2, 3, 4]);
});
});
describe('zip', () => {
test("zip(['a', 'b', 'c'], [1, 2, 3, 4])", () => {
expect(zip(['a', 'b', 'c'], [1, 2, 3, 4])).toEqual([
['a', 1],
['b', 2],
['c', 3],
]);
});
});