Skip to content

Commit

Permalink
tests(common) update file interceptors tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Nov 30, 2018
1 parent 42adbab commit 0a15879
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Expand Up @@ -30,7 +30,7 @@ describe('FileFieldsInterceptor', () => {

const callback = (req, res, next) => next();
const fieldsSpy = sinon
.stub((target as any).upload, 'fields')
.stub((target as any).multer, 'fields')
.returns(callback);

await target.intercept(new ExecutionContextHost([]), stream$);
Expand Down
Expand Up @@ -19,7 +19,7 @@ describe('FileInterceptor', () => {
const target = new (FileInterceptor(fieldName))();
const callback = (req, res, next) => next();
const singleSpy = sinon
.stub((target as any).upload, 'single')
.stub((target as any).multer, 'single')
.returns(callback);

await target.intercept(new ExecutionContextHost([]), stream$);
Expand All @@ -33,7 +33,7 @@ describe('FileInterceptor', () => {
const err = {};
const callback = (req, res, next) => next(err);

(target as any).upload = {
(target as any).multer = {
single: () => callback,
};
expect(
Expand Down
Expand Up @@ -21,7 +21,7 @@ describe('FilesInterceptor', () => {

const callback = (req, res, next) => next();
const arraySpy = sinon
.stub((target as any).upload, 'array')
.stub((target as any).multer, 'array')
.returns(callback);

await target.intercept(new ExecutionContextHost([]), stream$);
Expand All @@ -35,7 +35,7 @@ describe('FilesInterceptor', () => {
const err = {};
const callback = (req, res, next) => next(err);

(target as any).upload = {
(target as any).multer = {
array: () => callback,
};
expect(
Expand Down

0 comments on commit 0a15879

Please sign in to comment.