/
githubmirror
/
immutable-js
Обзор
Документация
Войти
/
githubmirror
/
immutable-js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
__tests__/functional/remove.ts
19 строк
559 B
Julien Deniau
sort all imports via eslint
12 июн 2025, 01:23
12 июн 2025, 01:23
67a4fa9
Код
Авторство
О чём код?
import { describe, expect, it } from '@jest/globals'; import { List, Map, remove } from 'immutable'; describe('remove', () => { it('for immutable structure', () => { expect(remove(List(['dog', 'frog', 'cat']), 1)).toEqual( List(['dog', 'cat']) ); expect(remove(Map({ x: 123, y: 456 }), 'x')).toEqual(Map({ y: 456 })); }); it('for Array', () => { expect(remove(['dog', 'frog', 'cat'], 1)).toEqual(['dog', 'cat']); }); it('for plain objects', () => { expect(remove({ x: 123, y: 456 }, 'x')).toEqual({ y: 456 }); }); });