UNPKG

544 BJavaScriptView Raw
1
2import { isType } from './fsw-structure';
3
4it('should check symbol types', () => {
5 expect(isType('S10000', 'hand')).toBe(true);
6 expect(isType('S10000', 'head')).toBe(false);
7})
8
9it('should not break isType on bad input', () => {
10 expect(isType()).toBe(false);
11 expect(isType(5)).toBe(false);
12 expect(isType(['what'])).toBe(false);
13 expect(isType('S10000')).toBe(false);
14 expect(isType('S10000', 5)).toBe(false);
15 expect(isType('S10000', ['a'])).toBe(false);
16 expect(isType('S10000', 'unavailable')).toBe(false);
17})