Skip to content

Commit

Permalink
add missing key to mock (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evanion authored Aug 1, 2023
1 parent 9a7a530 commit 9446696
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/correlation.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import {
NestModule,
} from '@nestjs/common';
import * as request from 'supertest';
import { CorrelationIdMiddleware, CorrelationModule } from 'src';
import { CorrelationIdMiddleware, CorrelationModule } from '../src';
import { TestModule } from './test-module/test.module';
import { HttpService } from '@nestjs/axios';
import { of } from 'rxjs';
import { AxiosRequestHeaders } from 'axios';

@Module({
imports: [CorrelationModule.forRoot(), TestModule],
Expand Down Expand Up @@ -38,7 +39,7 @@ describe('CorrelationMiddleware (e2e)', () => {

jest.spyOn(httpService, 'get').mockImplementation(() =>
of({
config: { url: 'http://example.com/test', method: 'GET' },
config: { url: 'http://example.com/test', method: 'GET', headers: {} as AxiosRequestHeaders },
headers: {
connection: 'keep-alive',
'content-type': 'application/json',
Expand Down

0 comments on commit 9446696

Please sign in to comment.