-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13d6efc
commit e33a227
Showing
6 changed files
with
198 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
'use strict'; | ||
|
||
// Init API instance | ||
const api = require('../index')({ version: 'v1.0', logger: false }) | ||
|
||
let event = { | ||
httpMethod: 'get', | ||
path: '/', | ||
body: {}, | ||
multiValueHeaders: { | ||
'content-type': ['application/json'] | ||
} | ||
} | ||
|
||
/******************************************************************************/ | ||
/*** DEFINE TEST ROUTES ***/ | ||
/******************************************************************************/ | ||
|
||
const middleware1 = (res,req,next) => { next() } | ||
const middleware2 = (res,req,next) => { next() } | ||
const middleware3 = (res,req,next) => { next() } | ||
const middleware4 = (res,req,next) => { next() } | ||
const getRoute = (res,req) => {} | ||
const getRoute2 = (res,req) => {} | ||
const getRoute3 = (res,req) => {} | ||
|
||
// api.use((err,req,res,next) => {}) | ||
api.use(middleware1) | ||
api.use(middleware2) | ||
api.use('/test',middleware3) | ||
api.get('/*',middleware4,getRoute2) | ||
api.get('/test',getRoute3) | ||
// api.get('/test/*',getRoute) | ||
// api.get('/test/testx',getRoute3) | ||
|
||
// api.use('/:test',middleware3) | ||
// api.get('/', function baseGetRoute(req,res) {}) | ||
// api.get('/p1/p2/:paramName', function getRoute(req,res) {}) | ||
// api.get('/p1/p2', function getRoute(req,res,next) {}) | ||
// api.get('/p1/p2', function getRoute2(req,res) {}) | ||
// api.get('/p1/*', (req,res) => {}) | ||
|
||
|
||
/******************************************************************************/ | ||
/*** BEGIN TESTS ***/ | ||
/******************************************************************************/ | ||
|
||
describe('Execution Stacks:', function() { | ||
it('test',()=>{}) | ||
}) // end ROUTE tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.