Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
expect(results).toEqual([
{
code: 'operation-2xx-response',
message: 'Operation must have at least one `2xx` response.',
path: ['paths', '/path1', 'get', 'responses'],
range: {
end: {
character: 30,
line: 9,
},
start: {
character: 20,
line: 4,
},
},
severity: DiagnosticSeverity.Warning,
},
]);
});
expect(results).toEqual([
{
code: 'operation-2xx-response',
message: 'Operation must have at least one `2xx` response.',
path: ['paths', '/path1', 'get', 'responses'],
range: {
end: {
character: 23,
line: 4,
},
start: {
character: 20,
line: 4,
},
},
severity: DiagnosticSeverity.Warning,
},
]);
});
});