Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Feb 9, 2022
1 parent edb073f commit ae60d1b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
4 changes: 1 addition & 3 deletions packages/jest-snapshot/src/__tests__/matcher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import jestSnapshot from '../';

const {toMatchSnapshot} = jestSnapshot;
import {toMatchSnapshot} from '../';

it('matcher returns matcher name, expected and actual values', () => {
const actual = 'a';
Expand Down
14 changes: 6 additions & 8 deletions packages/jest-snapshot/src/__tests__/printSnapshot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ import {
bForeground2,
bForeground3,
} from '../colors';
import jestSnapshot = require('../index');
import {
toMatchInlineSnapshot,
toMatchSnapshot,
toThrowErrorMatchingInlineSnapshot,
toThrowErrorMatchingSnapshot,
} from '../index';
import {
getReceivedColorForChalkInstance,
getSnapshotColorForChalkInstance,
Expand Down Expand Up @@ -132,13 +137,6 @@ expect.addSnapshotSerializer({
},
});

const {
toMatchInlineSnapshot,
toMatchSnapshot,
toThrowErrorMatchingInlineSnapshot,
toThrowErrorMatchingSnapshot,
} = jestSnapshot;

describe('chalk', () => {
// Because these tests give code coverage of get functions
// and give confidence that the escape sequences are correct,
Expand Down
4 changes: 1 addition & 3 deletions packages/jest-snapshot/src/__tests__/throwMatcher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import jestSnapshot from '..';

const {toThrowErrorMatchingSnapshot} = jestSnapshot;
import {toThrowErrorMatchingSnapshot} from '..';

let matchFn: jest.Mock;

Expand Down

0 comments on commit ae60d1b

Please sign in to comment.