@sutton-signwriting/core
Version:
a javascript package for node and browsers that supports general processing of the Sutton SignWriting script
18 lines (14 loc) • 544 B
JavaScript
import { isType } from './fsw-structure';
it('should check symbol types', () => {
expect(isType('S10000', 'hand')).toBe(true);
expect(isType('S10000', 'head')).toBe(false);
})
it('should not break isType on bad input', () => {
expect(isType()).toBe(false);
expect(isType(5)).toBe(false);
expect(isType(['what'])).toBe(false);
expect(isType('S10000')).toBe(false);
expect(isType('S10000', 5)).toBe(false);
expect(isType('S10000', ['a'])).toBe(false);
expect(isType('S10000', 'unavailable')).toBe(false);
})