Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const result = spectral.run({
responses: {
'200': {
name: 'ok',
},
'404': {
name: 'not found',
},
},
});
expect(result.results[0]).toEqual({
name: 'rule1',
message,
severity: ValidationSeverity.Warn,
severityLabel: ValidationSeverityLabel.Warn,
path: ['responses', '404', 'description'],
});
});