Skip to content

Commit 059d7ad

Browse files
committed
style: move test files
1 parent dd5cd6f commit 059d7ad

4 files changed

Lines changed: 33 additions & 18 deletions

File tree

packages/node-opentelemetry/__tests__/otel.test.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/node-opentelemetry/__tests__/instrumentations.test.ts renamed to packages/node-opentelemetry/src/__tests__/instrumentations.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { PassThrough, Readable } from 'stream';
22

3-
import { _parseConsoleArgs } from '../src/instrumentations/console';
3+
import { _parseConsoleArgs } from '../instrumentations/console';
44
import {
55
getShouldRecordBody,
66
interceptReadableStream,
77
splitCommaSeparatedStrings,
8-
} from '../src/instrumentations/http';
8+
} from '../instrumentations/http';
99

1010
describe('instrumentations', () => {
1111
describe('console', () => {

packages/node-opentelemetry/__tests__/logger.test.ts renamed to packages/node-opentelemetry/src/__tests__/logger.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import winston from 'winston';
22

3-
import { getWinstonTransport } from '../src/logger';
3+
import { getWinstonTransport } from '../logger';
44

55
const MAX_LEVEL = 'info';
66

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { init, initSDK, shutdown } from '../otel';
2+
3+
describe('otel', () => {
4+
it('can sucessively shutdown without initialization', () => {
5+
shutdown();
6+
shutdown();
7+
});
8+
9+
it('should be able to initialize the SDK with initSDK', async () => {
10+
initSDK({
11+
apiKey: 'blabla',
12+
advancedNetworkCapture: true,
13+
consoleCapture: true,
14+
});
15+
16+
await new Promise((resolve) => setTimeout(resolve, 1000));
17+
18+
shutdown();
19+
});
20+
21+
it('should be able to initialize the SDK with init', async () => {
22+
init({
23+
apiKey: 'blabla',
24+
});
25+
26+
await new Promise((resolve) => setTimeout(resolve, 1000));
27+
28+
shutdown();
29+
});
30+
});

0 commit comments

Comments
 (0)