Skip to content

Commit eb414fd

Browse files
committed
test: set up route filter middleware dependencies
1 parent 3532b42 commit eb414fd

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

test/testProxyRoute.test.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,30 @@
11
const { handleMessage, validGitRequest, stripGitHubFromGitPath } = require('../src/proxy/routes');
22
const chai = require('chai');
3+
const chaiHttp = require('chai-http');
4+
const sinon = require('sinon');
5+
const express = require('express');
6+
const proxyRouter = require('../src/proxy/routes').router;
7+
const chain = require('../src/proxy/chain');
38

9+
chai.use(chaiHttp);
10+
chai.should();
411
const expect = chai.expect;
512

13+
describe('proxy route filter middleware', () => {
14+
let app;
15+
16+
beforeEach(() => {
17+
app = express();
18+
app.use('/', proxyRouter);
19+
});
20+
21+
afterEach(() => {
22+
sinon.restore();
23+
});
24+
25+
});
26+
});
27+
628
describe('proxy route helpers', () => {
729
describe('handleMessage', async () => {
830
it('should handle short messages', async function () {

0 commit comments

Comments
 (0)