1
0
mirror of https://github.com/Microsoft/sql-server-samples.git synced 2025-12-08 14:58:54 +00:00
Files
sql-server-samples/samples/connect/node.js/windows/node_modules/msnodesql/test/connect.js
2016-07-18 16:08:26 -07:00

39 lines
1.3 KiB
JavaScript

//---------------------------------------------------------------------------------------------------------------------------------
// File: connect.js
// Contents: test suite for connections
//
// Copyright Microsoft Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at:
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//---------------------------------------------------------------------------------------------------------------------------------
var sql = require('../');
var assert = require( 'assert' );
var config = require( './test-config' );
suite( 'open', function() {
test('trusted connection to a server', function( done ) {
sql.open(config.conn_str,
function( err, conn ) {
assert.ifError( err );
assert( typeof conn == 'object');
done();
});
});
});