UNPKG

1.88 kBJavaScriptView Raw
1/****************************************************************************
2 Copyright 2015 Apigee Corporation
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 ****************************************************************************/
16'use strict';
17
18// disabled: including this test causes a full test run to break. todo: figure this out
19
20//var should = require('should');
21//var proxyquire = require('proxyquire').noPreserveCache();
22//
23//describe('config', function() {
24//
25// describe('swagger env var', function() {
26//
27// it('should load', function(done) {
28//
29// var config = proxyquire('../config', {});
30// should.not.exist(config.test);
31// process.env['swagger_test'] = 'test';
32//
33// config = proxyquire('../config', {});
34// should.exist(config.test);
35// config.test.should.equal('test');
36// done();
37// });
38//
39// it('should load subkeys', function(done) {
40//
41// var config = proxyquire('../config', {});
42// should.not.exist(config.sub);
43// process.env['swagger_sub_key'] = 'test';
44// process.env['swagger_sub_key2'] = 'test2';
45//
46// config = proxyquire('../config', {});
47// should.exist(config.sub);
48// config.sub.should.have.property('key', 'test');
49// config.sub.should.have.property('key2', 'test2');
50// done();
51// });
52// });
53//
54//});