File: colorize-diff.js

package info (click to toggle)
node-yarnpkg 1.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 92,980 kB
  • sloc: sh: 323; makefile: 19
file content (25 lines) | stat: -rw-r--r-- 501 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* @flow */

import colorizeDiff from '../../src/util/colorize-diff';
import {Reporter} from '../../src/reporters';

let from;
let to;
let reporter;

describe('colorizeDiff', () => {
  beforeAll(() => {
    reporter = new Reporter();
  });

  describe('when `from` and `to` versions are identical', () => {
    beforeEach(() => {
      from = '1.0.0';
      to = '1.0.0';
    });

    it('returns from/to value', () => {
      expect(colorizeDiff(from, to, reporter)).toEqual(from);
    });
  });
});