Changeset View
Changeset View
Standalone View
Standalone View
lib/utils/validation-utils.test.js
// @flow | // @flow | ||||
import { | import { | ||||
tMediaMessagePhoto, | tMediaMessagePhoto, | ||||
tMediaMessageVideo, | tMediaMessageVideo, | ||||
tNumEnum, | tNumEnum, | ||||
} from './validation-utils.js'; | } from './validation-utils.js'; | ||||
import { threadTypes } from '../types/thread-types.js'; | import { threadTypes } from '../types/thread-types-enum.js'; | ||||
import { values } from '../utils/objects.js'; | import { values } from '../utils/objects.js'; | ||||
describe('Validation utils', () => { | describe('Validation utils', () => { | ||||
describe('tNumEnum validator', () => { | describe('tNumEnum validator', () => { | ||||
it('Should discard when accepted set is empty', () => { | it('Should discard when accepted set is empty', () => { | ||||
expect(tNumEnum([]).is(1)).toBe(false); | expect(tNumEnum([]).is(1)).toBe(false); | ||||
}); | }); | ||||
▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines |