Skip to content

Commit

Permalink
chore: fix typo in test
Browse files Browse the repository at this point in the history
  • Loading branch information
kanadgupta committed Jun 23, 2022
1 parent 73870f2 commit 51a5ebb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions __tests__/cmds/__snapshots__/validate.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`rdme validate error handling should throw an error if an in valid Swagger definition is supplied 1`] = `
[SyntaxError: Swagger schema validation failed.
ADDITIONAL PROPERTY must NOT have additional properties
23 | "description": "Find out more",
24 | "url": "http://swagger.io",
> 25 | "this-shouldnt-be-here": true
| ^^^^^^^^^^^^^^^^^^^^^^^ 😲 this-shouldnt-be-here is not expected to be here!
26 | }
27 | }
28 | ],]
`;

exports[`rdme validate error handling should throw an error if an invalid OpenAPI 3.1 definition is supplied 1`] = `
[SyntaxError: OpenAPI schema validation failed.
Expand All @@ -27,3 +13,17 @@ REQUIRED must have required property 'name'
28 | }
29 | }]
`;
exports[`rdme validate error handling should throw an error if an invalid Swagger definition is supplied 1`] = `
[SyntaxError: Swagger schema validation failed.
ADDITIONAL PROPERTY must NOT have additional properties
23 | "description": "Find out more",
24 | "url": "http://swagger.io",
> 25 | "this-shouldnt-be-here": true
| ^^^^^^^^^^^^^^^^^^^^^^^ 😲 this-shouldnt-be-here is not expected to be here!
26 | }
27 | }
28 | ],]
`;
2 changes: 1 addition & 1 deletion __tests__/cmds/validate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('rdme validate', () => {
return expect(validate.run({ spec: './__tests__/__fixtures__/invalid-oas-3.1.json' })).rejects.toMatchSnapshot();
});

it('should throw an error if an in valid Swagger definition is supplied', () => {
it('should throw an error if an invalid Swagger definition is supplied', () => {
return expect(validate.run({ spec: './__tests__/__fixtures__/invalid-swagger.json' })).rejects.toMatchSnapshot();
});
});
Expand Down

0 comments on commit 51a5ebb

Please sign in to comment.