Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions packages/node-experimental/test/transports/http.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,17 @@ const defaultOptions = {
// empty function to keep test output clean
const consoleWarnSpy = jest.spyOn(console, 'warn').mockImplementation(() => {});

describe('makeNewHttpTransport()', () => {
afterEach(() => {
jest.clearAllMocks();

if (testServer) {
testServer.close();
}
});
afterEach(done => {
jest.clearAllMocks();

if (testServer && testServer.listening) {
testServer.close(done);
} else {
done();
}
});

describe('makeNewHttpTransport()', () => {
describe('.send()', () => {
it('should correctly send envelope to server', async () => {
await setupTestServer({ statusCode: SUCCESS }, (req, body) => {
Expand Down
18 changes: 10 additions & 8 deletions packages/node-experimental/test/transports/https.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,17 @@ const defaultOptions = {
recordDroppedEvent: () => undefined, // noop
};

describe('makeNewHttpsTransport()', () => {
afterEach(() => {
jest.clearAllMocks();

if (testServer) {
testServer.close();
}
});
afterEach(done => {
jest.clearAllMocks();

if (testServer && testServer.listening) {
testServer.close(done);
} else {
done();
}
});

describe('makeNewHttpsTransport()', () => {
describe('.send()', () => {
it('should correctly send envelope to server', async () => {
await setupTestServer({ statusCode: SUCCESS }, (req, body) => {
Expand Down
18 changes: 10 additions & 8 deletions packages/node/test/transports/http.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,17 @@ const defaultOptions = {
// empty function to keep test output clean
const consoleWarnSpy = jest.spyOn(console, 'warn').mockImplementation(() => {});

describe('makeNewHttpTransport()', () => {
afterEach(() => {
jest.clearAllMocks();

if (testServer) {
testServer.close();
}
});
afterEach(done => {
jest.clearAllMocks();

if (testServer && testServer.listening) {
testServer.close(done);
} else {
done();
}
});

describe('makeNewHttpTransport()', () => {
describe('.send()', () => {
it('should correctly send envelope to server', async () => {
await setupTestServer({ statusCode: SUCCESS }, (req, body) => {
Expand Down
18 changes: 10 additions & 8 deletions packages/node/test/transports/https.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,17 @@ const defaultOptions = {
recordDroppedEvent: () => undefined, // noop
};

describe('makeNewHttpsTransport()', () => {
afterEach(() => {
jest.clearAllMocks();

if (testServer) {
testServer.close();
}
});
afterEach(done => {
jest.clearAllMocks();

if (testServer && testServer.listening) {
testServer.close(done);
} else {
done();
}
});

describe('makeNewHttpsTransport()', () => {
describe('.send()', () => {
it('should correctly send envelope to server', async () => {
await setupTestServer({ statusCode: SUCCESS }, (req, body) => {
Expand Down