How to use the @graphql-inspector/core.ChangeType.TypeDescriptionChanged function in @graphql-inspector/core

To help you get started, we’ve selected a few @graphql-inspector/core 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 kamilkisiela / graphql-inspector / packages / cli / __tests__ / render.ts View on Github external
test('bold', () => {
  const change: Change = {
    criticality: {
      level: CriticalityLevel.Dangerous,
    },
    type: ChangeType.TypeDescriptionChanged,
    message: `Type 'Foo' changed its name to 'Bar'.`,
    path: 'Type.field',
  };

  const [, msg] = renderChange(change);

  expect(msg).toEqual(
    `Type ${chalk.bold('Foo')} changed its name to ${chalk.bold('Bar')}.`,
  );
});