Skip to content

Commit a98ec25

Browse files
chore: updates prom-client to new major version (#4219)
Signed-off-by: Konstantina Blazhukova <[email protected]>
1 parent fa6d7e2 commit a98ec25

File tree

3 files changed

+33
-18
lines changed

3 files changed

+33
-18
lines changed

package-lock.json

Lines changed: 25 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"pino": "^9.7.0",
9696
"pino-pretty": "^7.6.1",
9797
"pnpm": "^10.0.0",
98-
"prom-client": "^14.0.1",
98+
"prom-client": "^15.1.3",
9999
"redis": "^5.8.0"
100100
},
101101
"overrides": {

packages/ws-server/tests/unit/utils.spec.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,13 @@ describe('Utilities unit tests', async function () {
137137
relayStub.eth.returns(sinon.createStubInstance(EthImpl));
138138
limiterStub = sinon.createStubInstance(ConnectionLimiter);
139139
wsMetricRegistryStub = sinon.createStubInstance(WsMetricRegistry);
140-
wsMetricRegistryStub.getCounter.returns(sinon.createStubInstance(Counter));
141-
wsMetricRegistryStub.getHistogram.returns(
142-
sinon.createStubInstance(Histogram, {
143-
labels: sinon.stub<[Partial<Record<any, string | number>>]>().returns({
144-
observe: sinon.spy(),
145-
startTimer: sinon.spy(),
146-
}),
147-
}),
148-
);
140+
const counterStub = { inc: sinon.stub() } as unknown as Counter;
141+
wsMetricRegistryStub.getCounter.returns(counterStub);
142+
const fakeHistogram = {
143+
observe: sinon.stub(),
144+
startTimer: sinon.stub(),
145+
} as unknown as Histogram;
146+
wsMetricRegistryStub.getHistogram.returns(fakeHistogram);
149147
ctxStub = {
150148
websocket: {
151149
id: 'mock-id',

0 commit comments

Comments
 (0)