Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to traverse the mutation result inclusively #49

Open
BelfordZ opened this issue Jun 25, 2020 · 0 comments
Open

Add an option to traverse the mutation result inclusively #49

BelfordZ opened this issue Jun 25, 2020 · 0 comments

Comments

@BelfordZ
Copy link
Member

BelfordZ commented Jun 25, 2020

The test would look something like:

  it("it has an option for traversing the mutation results inclusively", () => {
    const testSchema = {
      type: "object"
    };
    const mergeProducer = jest.fn((s: CoreSchemaMetaSchema) => ({
      ...s,
      properties: {
        foo: { type: "string" }
      }
    }));

    const opts = { traverseMutationResult: true };

    const result = traverse(testSchema, mergeProducer, opts) as CoreSchemaMetaSchema;

    expect(result.properties).toBeDefined();

    expect(mergeProducer).toHaveBeenCalledTimes(2);
  });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@BelfordZ and others