/
githubmirror
/
jest
Обзор
Документация
Войти
/
githubmirror
/
jest
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/jest-diff/src/__tests__/diffStringsRaw.test.ts
34 строки
1005 B
Paul O’Shannessy
Update copyrights with Meta Platforms, restore original license in Jasmine fork (#13879)
09 фев 2023, 10:13
Не верифицирован
09 фев 2023, 10:13
6d2632a
Код
Авторство
О чём код?
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import {DIFF_DELETE, DIFF_EQUAL, DIFF_INSERT, Diff, diffStringsRaw} from '../'; describe('diffStringsRaw', () => { test('one-line with cleanup', () => { const expected: Array<Diff> = [ new Diff(DIFF_EQUAL, 'change '), new Diff(DIFF_DELETE, 'from'), new Diff(DIFF_INSERT, 'to'), ]; const received = diffStringsRaw('change from', 'change to', true); expect(received).toEqual(expected); }); test('one-line without cleanup', () => { const expected: Array<Diff> = [ new Diff(DIFF_EQUAL, 'change '), new Diff(DIFF_DELETE, 'fr'), new Diff(DIFF_INSERT, 't'), new Diff(DIFF_EQUAL, 'o'), new Diff(DIFF_DELETE, 'm'), ]; const received = diffStringsRaw('change from', 'change to', false); expect(received).toEqual(expected); }); });