Skip to content

Commit

Permalink
tests: inside
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Mar 31, 2022
1 parent 2fcf0c9 commit 101e6f1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/n4s/src/rules/__tests__/inside.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,11 @@ describe('Inside rule', () => {
it('Should failt to find a string inside another string in which it does not exist', () => {
expect(inside('mugs', "I'm gonna pop some tags")).toBe(false);
});

it('Should return false when either values is not an array or string', () => {
// @ts-ignore
expect(inside('pop', 1)).toBe(false);
// @ts-ignore
expect(inside(1, 'pop')).toBe(false);
});
});

0 comments on commit 101e6f1

Please sign in to comment.