We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1891b06 commit 36bdb6bCopy full SHA for 36bdb6b
test/specs/invalid/invalid.spec.js
@@ -2,6 +2,17 @@ describe('Invalid syntax', function () {
2
'use strict';
3
4
describe('in main file', function () {
5
+ it('should throw an error for an invalid file path', function () {
6
+ return $RefParser
7
+ .dereference('this file does not exist')
8
+ .then(helper.shouldNotGetCalled)
9
+ .catch(function (err) {
10
+ expect(err).to.be.an.instanceOf(Error);
11
+ expect(err.code).to.equal('ENOENT')
12
+ expect(err.message).to.contain('Error opening file ');
13
+ });
14
15
+
16
it('should throw an error for an invalid YAML file', function () {
17
return $RefParser
18
.dereference(path.rel('specs/invalid/invalid.yaml'))
0 commit comments