mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
31 lines
549 B
TypeScript
31 lines
549 B
TypeScript
|
|
import sinon = require("sinon");
|
|
|
|
export interface RequestMock {
|
|
app?: any;
|
|
body?: any;
|
|
session?: any;
|
|
headers?: any;
|
|
}
|
|
|
|
export interface ResponseMock {
|
|
send: sinon.SinonStub | sinon.SinonSpy;
|
|
status: sinon.SinonStub;
|
|
json: sinon.SinonStub;
|
|
}
|
|
|
|
export function RequestMock(): RequestMock {
|
|
return {
|
|
app: {
|
|
get: sinon.stub()
|
|
}
|
|
};
|
|
}
|
|
export function ResponseMock(): ResponseMock {
|
|
return {
|
|
send: sinon.stub(),
|
|
status: sinon.stub(),
|
|
json: sinon.stub()
|
|
};
|
|
}
|