Skip to content

Commit

Permalink
Testing the right functions in testUtils (#3880)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito authored Apr 15, 2023
1 parent 75114af commit e581cc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/__testUtils__/__tests__/expectMatchingValues-test.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { expect } from 'chai';
import { describe, it } from 'mocha';

import { expectEqualPromisesOrValues } from '../expectEqualPromisesOrValues.js';
import { expectMatchingValues } from '../expectMatchingValues.js';

describe('expectMatchingValues', () => {
it('throws when given unequal values', () => {
expect(() => expectEqualPromisesOrValues([{}, {}, { test: 'test' }])).throw(
expect(() => expectMatchingValues([{}, {}, { test: 'test' }])).throw(
"expected { test: 'test' } to deeply equal {}",
);
});

it('does not throw when given equal values', () => {
const testValue = { test: 'test' };
expect(() =>
expectEqualPromisesOrValues([testValue, testValue, testValue]),
expectMatchingValues([testValue, testValue, testValue]),
).not.to.throw();
});
});

0 comments on commit e581cc6

Please sign in to comment.