How to use the @inkline/inkline/src/validators/max.max function in @inkline/inkline

To help you get started, we’ve selected a few @inkline/inkline examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github inkline / inkline / tests / unit / validators / max.spec.js View on Github external
it('should compare to 0 if value not provided', () => {
            expect(max(0)).toEqual(true);
        });
    });
github inkline / inkline / tests / unit / validators / max.spec.js View on Github external
it('should return true if value is less than maximum', () => {
            expect(max('99', { value: 100 })).toEqual(true);
        });
github inkline / inkline / tests / unit / validators / max.spec.js View on Github external
it('should return false if value is greater than maximum', () => {
            expect(max('101', { value: 100 })).toEqual(false);
        });
github inkline / inkline / tests / unit / validators / max.spec.js View on Github external
it('should return false if value is null', () => {
            expect(max(null, { value: 0 })).toEqual(false);
        });
github inkline / inkline / tests / unit / validators / max.spec.js View on Github external
it('should return false if value is undefined', () => {
            expect(max(undefined, { value: 0 })).toEqual(false);
        });
github inkline / inkline / tests / unit / validators / max.spec.js View on Github external
it('should return true if value is equal to maximum', () => {
            expect(max('100', { value: 100 })).toEqual(true);
        });
github inkline / inkline / tests / unit / validators / max.spec.js View on Github external
it('should return true if all array entries are less than maximum', () => {
            expect(max(['100', '99', '98'], { value: 100 })).toEqual(true);
        });