Skip to content

Commit eb3a985

Browse files
committed
rm optional chaining
1 parent b382ac2 commit eb3a985

28 files changed

+45
-45
lines changed

packages/dht/test/integration/StoreOnDhtWithThreeNodes.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe('Storing data in DHT with two peers', () => {
3434
await entryPoint.stop()
3535
await node1.stop()
3636
await node2.stop()
37-
simulator?.stop()
37+
simulator!.stop()
3838
})
3939

4040
it('Node can store on three peer DHT', async () => {

packages/dht/test/integration/StoreOnDhtWithTwoNodes.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('Storing data in DHT with two peers', () => {
2626
afterEach(async () => {
2727
await entryPoint.stop()
2828
await otherNode.stop()
29-
simulator?.stop()
29+
simulator!.stop()
3030
})
3131

3232
it('Node can store on two peer DHT', async () => {

packages/node/test/integration/broker-subscriptions.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ describe('broker subscriptions', () => {
7474

7575
afterEach(async () => {
7676
await Promise.allSettled([
77-
mqttClient1?.end(true),
78-
mqttClient2?.end(true),
79-
client1?.destroy(),
80-
client2?.destroy(),
81-
broker1?.stop(),
82-
broker2?.stop(),
77+
mqttClient1.end(true),
78+
mqttClient2.end(true),
79+
client1.destroy(),
80+
client2.destroy(),
81+
broker1.stop(),
82+
broker2.stop(),
8383
])
8484

8585
})

packages/node/test/integration/multiple-publisher-plugins.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ describe('multiple publisher plugins', () => {
130130
})
131131

132132
afterEach(async () => {
133-
await broker?.stop()
133+
await broker.stop()
134134
})
135135

136136
it('subscribe by StreamrClient', async () => {

packages/node/test/integration/plugins/mqtt/Bridge.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('MQTT Bridge', () => {
5151
})
5252

5353
afterEach(async () => {
54-
await streamrClient?.destroy()
54+
await streamrClient.destroy()
5555
})
5656

5757
test('message published by a MQTT client is delivered only once', async () => {

packages/node/test/integration/plugins/operator/OperatorPlugin.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ describe('OperatorPlugin', () => {
3838
}, 30 * 1000)
3939

4040
afterEach(async () => {
41-
await broker?.stop()
41+
await broker.stop()
4242
})
4343

4444
async function waitForHeartbeatMessage(operatorContractAddress: EthereumAddress): Promise<void> {
4545
const client = createClient(fastPrivateKey())
4646
const sub = await client.subscribe(formCoordinationStreamId(operatorContractAddress))
4747
await collect(sub, 1)
48-
await client?.destroy()
48+
await client.destroy()
4949
}
5050

5151
it('accepts proxy connections', async () => {

packages/node/test/integration/plugins/storage/Storage.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ describe('Storage', () => {
136136

137137
afterAll(async () => {
138138
await Promise.allSettled([
139-
storage?.close(),
140-
cassandraClient?.shutdown()
139+
storage.close(),
140+
cassandraClient.shutdown()
141141
])
142142
})
143143

packages/node/test/integration/plugins/storage/StorageConfig.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('StorageConfig', () => {
3838
})
3939

4040
afterAll(async () => {
41-
await cassandraClient?.shutdown()
41+
await cassandraClient.shutdown()
4242
})
4343

4444
beforeEach(async () => {
@@ -50,7 +50,7 @@ describe('StorageConfig', () => {
5050
afterEach(async () => {
5151
await client.destroy()
5252
await Promise.allSettled([
53-
storageNode?.stop(),
53+
storageNode.stop(),
5454
])
5555
})
5656

packages/node/test/integration/plugins/storage/cassanda-queries.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ describe('cassanda-queries', () => {
121121
})
122122

123123
afterAll(async () => {
124-
await storage?.close() // also cleans up realClient
124+
await storage.close() // also cleans up realClient
125125
})
126126

127127
beforeEach(async () => {

packages/node/test/integration/plugins/storage/dataMetadataEndpoint.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ describe('dataMetadataEndpoints', () => {
4040

4141
afterAll(async () => {
4242
await Promise.allSettled([
43-
client1?.destroy(),
44-
storageNode?.stop()
43+
client1.destroy(),
44+
storageNode.stop()
4545
])
4646
}, TIMEOUT)
4747

0 commit comments

Comments
 (0)