How to use uniforms-bridge-simple-schema-2 - 9 common examples

To help you get started, we’ve selected a few uniforms-bridge-simple-schema-2 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 vazco / uniforms / packages / uniforms-bridge-simple-schema-2 / __tests__ / SimpleSchema2Bridge.ts View on Github external
p: { type: Array },
    'p.$': { type: String, uniforms: { transform: noop } },
    r: { type: String, uniforms: { options: { a: 1, b: 2 } } },
    s: {
      type: String,
      uniforms: {
        options: [{ label: 1, value: 'a' }, { label: 2, value: 'b' }],
      },
    },
    t: { type: String, uniforms: { options: () => ({ a: 1, b: 2 }) } },
    u: { type: SimpleSchema.Integer },
    w: { type: new SimpleSchema({ x: String }) },
    x: { type: String, autoValue: () => '$setOnInsert:hack!' },
  });

  const bridge = new SimpleSchema2Bridge(schema);

  describe('#check()', () => {
    it('works correctly with schema', () => {
      expect(SimpleSchema2Bridge.check(schema)).toBeTruthy();
    });

    it('works correctly without schema', () => {
      expect(SimpleSchema2Bridge.check()).not.toBeTruthy();
    });

    Object.keys(schema).forEach(method => {
      it(`works correctly without '${method}'`, () => {
        expect(
          SimpleSchema2Bridge.check({ ...schema, [method]: null }),
        ).not.toBeTruthy();
      });
github vazco / uniforms / packages / uniforms-bridge-simple-schema-2 / __tests__ / SimpleSchema2Bridge.ts View on Github external
it('works correctly with schema', () => {
      expect(SimpleSchema2Bridge.check(schema)).toBeTruthy();
    });
github vazco / uniforms / packages / uniforms-bridge-simple-schema-2 / __tests__ / SimpleSchema2Bridge.ts View on Github external
it(`works correctly without '${method}'`, () => {
        expect(
          SimpleSchema2Bridge.check({ ...schema, [method]: null }),
        ).not.toBeTruthy();
      });
    });
github vazco / uniforms / packages / uniforms-antd / __tests__ / _createSchema.ts View on Github external
const createSchema = schema =>
  new SimpleSchema2Bridge(new SimpleSchema(schema));
github vazco / uniforms / packages / uniforms-bootstrap4 / __tests__ / _createSchema.ts View on Github external
const createSchema = schema =>
  new SimpleSchema2Bridge(new SimpleSchema(schema));
github vazco / uniforms / packages / uniforms-semantic / __tests__ / _createSchema.ts View on Github external
const createSchema = schema =>
  new SimpleSchema2Bridge(new SimpleSchema(schema));
github vazco / uniforms / packages / uniforms-unstyled / __tests__ / _createSchema.js View on Github external
const createSchema = schema =>
  new SimpleSchema2Bridge(new SimpleSchema(schema));
github vazco / uniforms / packages / uniforms-bootstrap3 / __tests__ / _createSchema.ts View on Github external
const createSchema = schema =>
  new SimpleSchema2Bridge(new SimpleSchema(schema));
github vazco / uniforms / packages / uniforms-material / __tests__ / _createSchema.ts View on Github external
const createSchema = schema =>
  new SimpleSchema2Bridge(new SimpleSchema(schema));

uniforms-bridge-simple-schema-2

SimpleSchema 2 bridge for uniforms.

MIT
Latest version published 10 months ago

Package Health Score

55 / 100
Full package analysis