Compare 70d0a6b ... +1 ... 52375aa

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 4 files from the diff.

@@ -17,6 +17,7 @@
Loading
17 17
    private static counter = SocketHandler.COUNTER_START;
18 18
19 19
    protected static socketHandlers: Map<Symbol, SocketHandler> = new Map();
20 +
    protected static _handlersIds: Map<Symbol, string> = new Map();
20 21
    protected static _pendingMap: { [prop: string]: Map<string, Array<any>> } = {
21 22
        [HandlerType.SERVER]: new Map(),
22 23
        [HandlerType.SOCKET]: new Map()
@@ -35,14 +36,18 @@
Loading
35 36
    public static init(HttpServer: any,
36 37
                       socketConfig: SocketIOStatic.ServerOptions = {},
37 38
                       namespace: string = "/"): SocketIOStatic.Server {
38 -
        const id = SocketHandler.IDPrefix + this.counter++;
39 +
        const serverSymbol = Symbol.for(HttpServer);
40 +
        const id = SocketHandler._handlersIds.has(serverSymbol)
41 +
        ? SocketHandler._handlersIds.get(serverSymbol)
42 +
        : SocketHandler.IDPrefix + this.counter++;
39 43
        let socketHandler;
40 44
        if (this.socketHandlers.has(Symbol.for(id))) {
41 -
            socketHandler = this.socketHandlers.has(Symbol.for(id));
45 +
            socketHandler = this.socketHandlers.get(Symbol.for(id));
42 46
            socketHandler.addNamespace(namespace);
43 47
        } else {
44 48
            socketHandler = new this(HttpServer, id, socketConfig, namespace);
45 49
            this.socketHandlers.set(Symbol.for(id), socketHandler);
50 +
            SocketHandler._handlersIds.set(serverSymbol, id);
46 51
        }
47 52
        return socketHandler.getServer();
48 53
    }

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
classes 89.52%
constants 100.00%
decorators 77.42%
__tests__/services/socket.service.ts 90.00%
exceptions/socket.exception.ts 100.00%
index.ts 100.00%
services/socket-handler.adapter.ts +3.30% 85.23%
utils/socket.utils.ts 100.00%
Project Totals (12 files) 86.64%
Loading