Skip to content

Commit 26c06f6

Browse files
committed
[explorer/frontend] fix: typo in test comments
1 parent 355e386 commit 26c06f6

18 files changed

+115
-112
lines changed

explorer/frontend/__tests__/api/accounts.test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('api/accounts', () => {
2727
const expectedURL = 'https://explorer.backend/accounts?limit=123&offset=123';
2828
const expectedResult = accountPageResult;
2929

30-
// Act & Assert:
30+
// Act + Assert:
3131
await runAPITest(fetchAccountPage, searchCriteria, accountPageResponse, expectedURL, expectedResult);
3232
});
3333

@@ -41,7 +41,7 @@ describe('api/accounts', () => {
4141
const expectedURL = 'https://explorer.backend/mosaic/rich/list?limit=123&offset=123&namespaceName=custom.mosaic';
4242
const expectedResult = accountPageMosaicFilterResult;
4343

44-
// Act & Assert:
44+
// Act + Assert:
4545
await runAPITest(fetchAccountPage, searchCriteria, accountPageMosaicFilterResponse, expectedURL, expectedResult);
4646
});
4747
});
@@ -53,7 +53,7 @@ describe('api/accounts', () => {
5353
const expectedURL = 'https://explorer.backend/account?address=NDHEJKXY6YK7JGRFQT2L7P3O5VMUGR4BWKQNVXXQ';
5454
const expectedResult = accountInfoResult;
5555

56-
// Act & Assert:
56+
// Act + Assert:
5757
await runAPITest(fetchAccountInfo, params, accountInfoResponse, expectedURL, expectedResult);
5858
});
5959
});
@@ -66,7 +66,7 @@ describe('api/accounts', () => {
6666
'https://explorer.backend/account?publicKey=019B4EDDAEFA086A328EB907ECBC5ED0EABD6BBB6F3BA25B22A310CB5917A808';
6767
const expectedResult = accountInfoResult;
6868

69-
// Act & Assert:
69+
// Act + Assert:
7070
await runAPITest(fetchAccountInfoByPublicKey, params, accountInfoResponse, expectedURL, expectedResult);
7171
});
7272
});

explorer/frontend/__tests__/api/blocks.test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('api/blocks', () => {
2020
const expectedURL = 'https://explorer.backend/blocks?limit=123&offset=123';
2121
const expectedResult = blockPageResult;
2222

23-
// Act & Assert:
23+
// Act + Assert:
2424
await runAPITest(fetchBlockPage, searchCriteria, blockPageResponse, expectedURL, expectedResult);
2525
});
2626
});
@@ -32,7 +32,7 @@ describe('api/blocks', () => {
3232
const expectedURL = 'https://explorer.backend/block/1111111';
3333
const expectedResult = blockInfoResult;
3434

35-
// Act & Assert:
35+
// Act + Assert:
3636
await runAPITest(fetchBlockInfo, params, blockInfoResponse, expectedURL, expectedResult);
3737
});
3838
});
@@ -44,7 +44,7 @@ describe('api/blocks', () => {
4444
const expectedURL = 'https://explorer.backend/blocks?limit=1&offset=0';
4545
const expectedResult = 4695085;
4646

47-
// Act & Assert:
47+
// Act + Assert:
4848
await runAPITest(fetchChainHight, params, blockPageResponse, expectedURL, expectedResult);
4949
});
5050
});

explorer/frontend/__tests__/api/mosaics.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('api/mosaics', () => {
2020
const expectedURL = 'https://explorer.backend/mosaics?limit=123&offset=246';
2121
const expectedResult = mosaicPageResult;
2222

23-
// Act & Assert:
23+
// Act + Assert:
2424
await runAPITest(fetchMosaicPage, searchCriteria, mosaicPageResponse, expectedURL, expectedResult);
2525
});
2626
});
@@ -32,7 +32,7 @@ describe('api/mosaics', () => {
3232
const expectedURL = 'https://explorer.backend/mosaic/arustest.shone';
3333
const expectedResult = mosaicInfoResult;
3434

35-
// Act & Assert:
35+
// Act + Assert:
3636
await runAPITest(fetchMosaicInfo, params, mosaicInfoResponse, expectedURL, expectedResult);
3737
});
3838
});

explorer/frontend/__tests__/api/namespaces.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('api/namespaces', () => {
2020
const expectedURL = 'https://explorer.backend/namespaces?limit=123&offset=246';
2121
const expectedResult = namespacePageResult;
2222

23-
// Act & Assert:
23+
// Act + Assert:
2424
await runAPITest(fetchNamespacePage, searchCriteria, namespacePageResponse, expectedURL, expectedResult);
2525
});
2626
});
@@ -32,7 +32,7 @@ describe('api/namespaces', () => {
3232
const expectedURL = 'https://explorer.backend/namespace/arustest.shone';
3333
const expectedResult = namespaceInfoResult;
3434

35-
// Act & Assert:
35+
// Act + Assert:
3636
await runAPITest(fetchNamespaceInfo, params, namespaceInfoResponse, expectedURL, expectedResult);
3737
});
3838
});

explorer/frontend/__tests__/api/search.test.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ describe('api/search', () => {
4949
block: blockInfoResult
5050
};
5151

52-
// Act & Assert:
52+
// Act + Assert:
5353
await runSearchTest(searchQuery, responseMap, expectedResult);
5454
});
5555

@@ -65,7 +65,7 @@ describe('api/search', () => {
6565
namespace: namespaceInfoResult
6666
};
6767

68-
// Act & Assert:
68+
// Act + Assert:
6969
await runSearchTest(searchQuery, responseMap, expectedResult);
7070
});
7171

@@ -79,7 +79,7 @@ describe('api/search', () => {
7979
namespace: namespaceInfoResult
8080
};
8181

82-
// Act & Assert:
82+
// Act + Assert:
8383
await runSearchTest(searchQuery, responseMap, expectedResult);
8484
});
8585

@@ -95,7 +95,7 @@ describe('api/search', () => {
9595
namespace: namespaceInfoResult
9696
};
9797

98-
// Act & Assert:
98+
// Act + Assert:
9999
await runSearchTest(searchQuery, responseMap, expectedResult);
100100
});
101101

@@ -109,7 +109,7 @@ describe('api/search', () => {
109109
mosaic: mosaicInfoResult
110110
};
111111

112-
// Act & Assert:
112+
// Act + Assert:
113113
await runSearchTest(searchQuery, responseMap, expectedResult);
114114
});
115115

@@ -123,7 +123,7 @@ describe('api/search', () => {
123123
transaction: transactionInfoResult
124124
};
125125

126-
// Act & Assert:
126+
// Act + Assert:
127127
await runSearchTest(searchQuery, responseMap, expectedResult);
128128
});
129129

@@ -137,7 +137,7 @@ describe('api/search', () => {
137137
account: accountInfoResult
138138
};
139139

140-
// Act & Assert:
140+
// Act + Assert:
141141
await runSearchTest(searchQuery, responseMap, expectedResult);
142142
});
143143

@@ -152,7 +152,7 @@ describe('api/search', () => {
152152
account: accountInfoResult
153153
};
154154

155-
// Act & Assert:
155+
// Act + Assert:
156156
await runSearchTest(searchQuery, responseMap, expectedResult);
157157
});
158158

@@ -162,7 +162,7 @@ describe('api/search', () => {
162162
const responseMap = {};
163163
const expectedResult = {};
164164

165-
// Act & Assert:
165+
// Act + Assert:
166166
await runSearchTest(searchQuery, responseMap, expectedResult);
167167
});
168168
});

explorer/frontend/__tests__/api/stats.test.js

+14-11
Original file line numberDiff line numberDiff line change
@@ -81,45 +81,48 @@ describe('api/stats', () => {
8181
};
8282
const expectedResult = accountStatsResult;
8383

84-
// Act & Assert:
84+
// Act + Assert:
8585
await runStatsTest(functionToTest, args, responseMap, expectedResult);
8686
});
8787
});
8888

8989
describe('fetchTransactionChart', () => {
9090
it('returns daily transaction chart data', async () => {
91+
// Arrange:
9192
const functionToTest = fetchTransactionChart;
9293
const args = [{ isPerDay: true }];
9394
const responseMap = {
9495
'https://explorer.backend/transaction/daily?startDate=2024-03-15&endDate=2024-06-13': dailyTransactionChartResponse
9596
};
9697
const expectedResult = dailyTransactionChartResult;
9798

98-
// Act & Assert:
99+
// Act + Assert:
99100
await runStatsTest(functionToTest, args, responseMap, expectedResult);
100101
});
101102

102103
it('returns monthly transaction chart data', async () => {
104+
// Arrange:
103105
const functionToTest = fetchTransactionChart;
104106
const args = [{ isPerMonth: true }];
105107
const responseMap = {
106108
'https://explorer.backend/transaction/monthly?startDate=2020-06-13&endDate=2024-06-13': monthlyTransactionChartResponse
107109
};
108110
const expectedResult = monthlyTransactionChartResult;
109111

110-
// Act & Assert:
112+
// Act + Assert:
111113
await runStatsTest(functionToTest, args, responseMap, expectedResult);
112114
});
113115

114116
it('returns block transaction chart data', async () => {
117+
// Arrange:
115118
const functionToTest = fetchTransactionChart;
116119
const args = [{}];
117120
const responseMap = {
118121
'https://explorer.backend/blocks?limit=240&offset=0': blockPageResponse.slice(-3)
119122
};
120123
const expectedResult = blockTransactionChartResult;
121124

122-
// Act & Assert:
125+
// Act + Assert:
123126
await runStatsTest(functionToTest, args, responseMap, expectedResult);
124127
});
125128
});
@@ -135,7 +138,7 @@ describe('api/stats', () => {
135138
};
136139
const expectedResult = transactionStatsResult;
137140

138-
// Act & Assert:
141+
// Act + Assert:
139142
await runStatsTest(functionToTest, args, responseMap, expectedResult);
140143
});
141144
});
@@ -150,7 +153,7 @@ describe('api/stats', () => {
150153
};
151154
const expectedResult = blockStatsResult;
152155

153-
// Act & Assert:
156+
// Act + Assert:
154157
await runStatsTest(functionToTest, args, responseMap, expectedResult);
155158
});
156159
});
@@ -169,7 +172,7 @@ describe('api/stats', () => {
169172
supernodes: 2
170173
};
171174

172-
// Act & Assert:
175+
// Act + Assert:
173176
await runStatsTest(functionToTest, args, responseMap, expectedResult);
174177
});
175178
});
@@ -184,7 +187,7 @@ describe('api/stats', () => {
184187
};
185188
const expectedResult = marketDataResult;
186189

187-
// Act & Assert:
190+
// Act + Assert:
188191
await runStatsTest(functionToTest, args, responseMap, expectedResult);
189192
});
190193
});
@@ -199,7 +202,7 @@ describe('api/stats', () => {
199202
};
200203
const expectedResult = 0.857586129846396;
201204

202-
// Act & Assert:
205+
// Act + Assert:
203206
await runStatsTest(functionToTest, args, responseMap, expectedResult);
204207
});
205208

@@ -212,7 +215,7 @@ describe('api/stats', () => {
212215
};
213216
const expectedResult = 0.857586129846396;
214217

215-
// Act & Assert:
218+
// Act + Assert:
216219
await runStatsTest(functionToTest, args, responseMap, expectedResult);
217220
});
218221

@@ -225,7 +228,7 @@ describe('api/stats', () => {
225228
};
226229
const expectedResult = null;
227230

228-
// Act & Assert:
231+
// Act + Assert:
229232
await runStatsTest(functionToTest, args, responseMap, expectedResult);
230233
});
231234
});

explorer/frontend/__tests__/api/transactions.test.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('api/transactions', () => {
3535
const expectedURL = 'https://explorer.backend/transactions?limit=123&offset=246';
3636
const expectedResult = transactionPageResult;
3737

38-
// Act & Assert:
38+
// Act + Assert:
3939
await runAPITest(fetchTransactionPage, searchCriteria, transactionPageResponse, expectedURL, expectedResult);
4040
});
4141

@@ -49,7 +49,7 @@ describe('api/transactions', () => {
4949
const expectedURL = 'https://explorer.backend/transactions/unconfirmed?limit=123&offset=246';
5050
const expectedResult = transactionUnconfirmedPageResult;
5151

52-
// Act & Assert:
52+
// Act + Assert:
5353
await runAPITest(fetchTransactionPage, searchCriteria, transactionUnconfirmedPageResponse, expectedURL, expectedResult);
5454
});
5555

@@ -63,7 +63,7 @@ describe('api/transactions', () => {
6363
const expectedURL = `https://explorer.backend/transactions?limit=10&offset=20&senderAddress=${senderAddress}&recipientAddress=${recipientAddress}`;
6464
const expectedResult = transactionPageResult;
6565

66-
// Act & Assert:
66+
// Act + Assert:
6767
await runAPITest(fetchTransactionPage, searchCriteria, transactionPageResponse, expectedURL, expectedResult);
6868
});
6969

@@ -76,7 +76,7 @@ describe('api/transactions', () => {
7676
const expectedURL = `https://explorer.backend/transactions?limit=10&offset=20&address=${currentAddress}`;
7777
const expectedResult = transactionAccountPageResult;
7878

79-
// Act & Assert:
79+
// Act + Assert:
8080
await runAPITest(fetchTransactionPage, searchCriteria, transactionPageResponse, expectedURL, expectedResult);
8181
});
8282

@@ -90,7 +90,7 @@ describe('api/transactions', () => {
9090
const expectedURL = `https://explorer.backend/transactions?limit=10&offset=20&senderAddress=${senderAddress}&recipientAddress=${currentAddress}`;
9191
const expectedResult = transactionAccountPageResult;
9292

93-
// Act & Assert:
93+
// Act + Assert:
9494
await runAPITest(fetchTransactionPage, searchCriteria, transactionPageResponse, expectedURL, expectedResult);
9595
});
9696

@@ -104,7 +104,7 @@ describe('api/transactions', () => {
104104
const expectedURL = `https://explorer.backend/transactions?limit=10&offset=20&senderAddress=${currentAddress}&recipientAddress=${recipientAddress}`;
105105
const expectedResult = transactionAccountPageResult;
106106

107-
// Act & Assert:
107+
// Act + Assert:
108108
await runAPITest(fetchTransactionPage, searchCriteria, transactionPageResponse, expectedURL, expectedResult);
109109
});
110110
});
@@ -116,7 +116,7 @@ describe('api/transactions', () => {
116116
const expectedURL = 'https://explorer.backend/transaction/596E3EC601470D9A5FDF966833566390C13D5DB7D24F5C9C712AC2056D7AE255';
117117
const expectedResult = transactionInfoResult;
118118

119-
// Act & Assert:
119+
// Act + Assert:
120120
await runAPITest(fetchTransactionInfo, params, transactionInfoResponse, expectedURL, expectedResult);
121121
});
122122

@@ -126,7 +126,7 @@ describe('api/transactions', () => {
126126
const expectedURL = 'https://explorer.backend/transaction/596E3EC601470D9A5FDF966833566390C13D5DB7D24F5C9C712AC2056D7AE255';
127127
const expectedResult = unsupportedTransactionInfoResult;
128128

129-
// Act & Assert:
129+
// Act + Assert:
130130
await runAPITest(fetchTransactionInfo, params, unsupportedTransactionInfoResponse, expectedURL, expectedResult);
131131
});
132132
});

explorer/frontend/__tests__/pages/AccountInfo.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe('AccountInfo', () => {
6464
}
6565
};
6666

67-
// Act & Assert:
67+
// Act + Assert:
6868
await runTest(accountInfo, expectedResult);
6969
});
7070

@@ -75,7 +75,7 @@ describe('AccountInfo', () => {
7575
notFound: true
7676
};
7777

78-
// Act & Assert:
78+
// Act + Assert:
7979
await runTest(accountInfo, expectedResult);
8080
});
8181
});

0 commit comments

Comments
 (0)