示例#1
0
		it( 'asynchronously reads and merges config from a file when a callback is passed', function ( done ) {
			var option = new Options( {a : true, b : true} );
			option.read( __dirname + '/fixtures/test.conf', function ( error ) {
				expect( option.value.a ).to.equal( 'foobar' );
				expect( option.value.b ).to.equal( false );
				done();
			} );
		} )
示例#2
0
		it( 'reads and merges config from a file', function () {
			var option = new Options( {a : true, b : true} );
			option.read( __dirname + '/fixtures/test.conf' );
			expect( option.value.a ).to.equal( 'foobar' );
			expect( option.value.b ).to.equal( false );
		} )
示例#3
0
 it('reads and merges config from a file', function () {
     var option = new Options({a: true, b: true});
     option.read(__dirname + '/fixtures/test.conf');
     assert.strictEqual('foobar', option.value.a);
     assert.strictEqual(false, option.value.b);
 });