mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-25 04:00:43 -04:00
16 lines
497 B
TypeScript
16 lines
497 B
TypeScript
import { isContained } from './is-contained';
|
|
|
|
describe('client/src isContained', () => {
|
|
it('returns true if `arr1` values are contained in `arr2`', () => {
|
|
const arr1 = ['dog', 'cat'];
|
|
const arr2 = ['cat', 'dog'];
|
|
expect(isContained(arr1, arr2)).toEqual(true);
|
|
});
|
|
|
|
it('returns true if `arr1` values are not contained in `arr2`', () => {
|
|
const arr1 = ['dog', 'cat'];
|
|
const arr2 = ['cat', 'monkey', 'bird'];
|
|
expect(isContained(arr1, arr2)).toEqual(false);
|
|
});
|
|
});
|