diff --git a/.gitignore b/.gitignore index 405725d..2e9701a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ coverage/ node_modules/ npm-debug.log -lib +/lib/* + +!test/e2e/sample/lib/* **/*.csv \ No newline at end of file diff --git a/test/e2e/sample/lib/externalScriptFile.js b/test/e2e/sample/lib/externalScriptFile.js new file mode 100644 index 0000000..f6cc634 --- /dev/null +++ b/test/e2e/sample/lib/externalScriptFile.js @@ -0,0 +1,9 @@ +module.exports = function (context, req) { + context.log('"./lib/externalScriptFile" function called'); + const res = { + body: { + "success":true + } + } + context.done(null, res); +}; \ No newline at end of file diff --git a/test/e2e/sample/lib/model.js b/test/e2e/sample/lib/model.js new file mode 100644 index 0000000..b0d17ca --- /dev/null +++ b/test/e2e/sample/lib/model.js @@ -0,0 +1,18 @@ +let sql = require('tedious'); + +class Model { + getAll() { + const request = new sql.Request("select 'hello'", function(err, rowCount) { + // no op + }); + return Promise.resolve([]); + } + + add() { + return Promise.resolve({}); + } +} + +module.exports = { + Model: Model +} \ No newline at end of file