Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
berndfuhrmann committed Nov 22, 2024
1 parent c500852 commit 26f5e6d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sdk_contrib/fetch/test/unit/fetch_p.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ describe('Unit tests', function () {

it('short circuits if headers include trace ID', async function () {
const activeFetch = captureFetch(true);
const request = new Request('https://www.foo.com', {
const request = new FetchRequest('https://www.foo.com', {
headers: {
'X-Amzn-Trace-Id': '12345'
}
Expand All @@ -180,7 +180,7 @@ describe('Unit tests', function () {
stubResolveSegment.should.have.been.called;

// check if dispatcher was transferred
const dummyRequest = new Request('https://www.foo.com', {
const dummyRequest = new FetchRequest('https://www.foo.com', {
dispatcher: agent
});
const dispatcherSymbol = Object.getOwnPropertySymbols(dummyRequest).find(symbol => symbol.description === 'dispatcher');
Expand All @@ -194,14 +194,14 @@ describe('Unit tests', function () {
const agent = new Agent({
maxSockets: 1234
});
await activeFetch(new Request('https://www.foo.com'), {
await activeFetch(new FetchRequest('https://www.foo.com'), {
dispatcher: agent
});
stubFetch.should.have.been.calledOnceWith(sinon.match({ url: 'https://www.foo.com/' }));
stubResolveSegment.should.have.been.called;

// check if dispatcher was transferred
const dummyRequest = new Request('https://www.foo.com', {
const dummyRequest = new FetchRequest('https://www.foo.com', {
dispatcher: agent
});
const dispatcherSymbol = Object.getOwnPropertySymbols(dummyRequest).find(symbol => symbol.description === 'dispatcher');
Expand All @@ -222,7 +222,7 @@ describe('Unit tests', function () {
stubResolveSegment.should.have.been.called;

// check if dispatcher was transferred
const dummyRequest = new Request('https://www.foo.com', {
const dummyRequest = new FetchRequest('https://www.foo.com', {
dispatcher: agent
});
const dispatcherSymbol = Object.getOwnPropertySymbols(dummyRequest).find(symbol => symbol.description === 'dispatcher');
Expand Down

0 comments on commit 26f5e6d

Please sign in to comment.