|
1 | 1 | 'use strict'; |
2 | 2 |
|
3 | 3 | describe('File names with special characters', function() { |
4 | | - it('should parse successfully', function(done) { |
| 4 | + it('should parse successfully', function() { |
5 | 5 | var parser = new $RefParser(); |
6 | | - parser |
| 6 | + return parser |
7 | 7 | .parse(path.rel('specs/__({[ ! % & $ # @ ` ~ ,)}]__/__({[ ! % & $ # @ ` ~ ,)}]__.yaml')) |
8 | 8 | .then(function(schema) { |
9 | 9 | expect(schema).to.equal(parser.schema); |
10 | 10 | expect(schema).to.deep.equal(helper.parsed.specialCharacters.schema); |
11 | 11 | expect(parser.$refs.paths()).to.deep.equal([path.abs('specs/__({[ ! % & $ # @ ` ~ ,)}]__/__({[ ! % & $ # @ ` ~ ,)}]__.yaml')]); |
12 | | - done(); |
13 | | - }) |
14 | | - .catch(helper.shouldNotGetCalled(done)); |
| 12 | + }); |
15 | 13 | }); |
16 | 14 |
|
17 | 15 | it('should resolve successfully', helper.testResolve( |
18 | 16 | 'specs/__({[ ! % & $ # @ ` ~ ,)}]__/__({[ ! % & $ # @ ` ~ ,)}]__.yaml', helper.parsed.specialCharacters.schema, |
19 | 17 | 'specs/__({[ ! % & $ # @ ` ~ ,)}]__/__({[ ! % & $ # @ ` ~ ,)}]__/__({[ ! % & $ # @ ` ~ ,)}]__.json', helper.parsed.specialCharacters.file |
20 | 18 | )); |
21 | 19 |
|
22 | | - it('should dereference successfully', function(done) { |
| 20 | + it('should dereference successfully', function() { |
23 | 21 | var parser = new $RefParser(); |
24 | | - parser |
| 22 | + return parser |
25 | 23 | .dereference(path.rel('specs/__({[ ! % & $ # @ ` ~ ,)}]__/__({[ ! % & $ # @ ` ~ ,)}]__.yaml')) |
26 | 24 | .then(function(schema) { |
27 | 25 | expect(schema).to.equal(parser.schema); |
28 | 26 | expect(schema).to.deep.equal(helper.dereferenced.specialCharacters); |
29 | 27 |
|
30 | 28 | // The "circular" flag should NOT be set |
31 | 29 | expect(parser.$refs.circular).to.equal(false); |
32 | | - |
33 | | - done(); |
34 | | - }) |
35 | | - .catch(helper.shouldNotGetCalled(done)); |
| 30 | + }); |
36 | 31 | }); |
37 | 32 |
|
38 | | - it('should bundle successfully', function(done) { |
| 33 | + it('should bundle successfully', function() { |
39 | 34 | var parser = new $RefParser(); |
40 | | - parser |
| 35 | + return parser |
41 | 36 | .bundle(path.rel('specs/__({[ ! % & $ # @ ` ~ ,)}]__/__({[ ! % & $ # @ ` ~ ,)}]__.yaml')) |
42 | 37 | .then(function(schema) { |
43 | 38 | expect(schema).to.equal(parser.schema); |
44 | 39 | expect(schema).to.deep.equal(helper.dereferenced.specialCharacters); |
45 | | - done(); |
46 | | - }) |
47 | | - .catch(helper.shouldNotGetCalled(done)); |
| 40 | + }); |
48 | 41 | }); |
49 | 42 | }); |
0 commit comments