Skip to content

Commit

Permalink
fix: bootstraping
Browse files Browse the repository at this point in the history
  • Loading branch information
zetxx committed Aug 19, 2021
1 parent f44fadf commit edd8234
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
29 changes: 29 additions & 0 deletions examples/mssql/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const sql = require('mssql');

const query = (async() => {
const {
server,
user,
password,
pool,
database,
options
} = require('../mssql.config.js');
const cPool = await sql.connect({
server,
user,
password,
pool,
database,
options
});
return async(q) => {
try {
return await cPool.request().query(q);
} catch (e) {
console.warn(q);
console.error(e);
throw e;
}
};
});
1 change: 1 addition & 0 deletions tests/unit/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// require('./test.dummy');
11 changes: 11 additions & 0 deletions tests/unit/test.dummy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const tap = require('tap');

tap.test('Dummy', (t) => {
t.same(
1,
1,
'should be same'
);
t.end();
});

0 comments on commit edd8234

Please sign in to comment.