Skip to content

Commit 6e3e5d1

Browse files
committed
fix: tests
1 parent c9d9247 commit 6e3e5d1

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

packages/phishing-controller/src/PhishingController.test.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3234,7 +3234,7 @@ describe('PhishingController', () => {
32343234
clock.restore();
32353235
});
32363236

3237-
it('should return the scan result for a valid address', async () => {
3237+
it('will return the scan result for a valid address', async () => {
32383238
const scope = nock(SECURITY_ALERTS_BASE_URL)
32393239
.post(ADDRESS_SCAN_ENDPOINT, {
32403240
chain: 'ethereum',
@@ -3257,7 +3257,7 @@ describe('PhishingController', () => {
32573257
[503, 'Service Unavailable'],
32583258
[504, 'Gateway Timeout'],
32593259
])(
3260-
'should return an AddressScanResult with a benign result on %i status code',
3260+
'will return an AddressScanResult with an ErrorResult on %i status code',
32613261
async (statusCode) => {
32623262
const scope = nock(SECURITY_ALERTS_BASE_URL)
32633263
.post(ADDRESS_SCAN_ENDPOINT, {
@@ -3268,14 +3268,14 @@ describe('PhishingController', () => {
32683268

32693269
const response = await controller.scanAddress(testChainId, testAddress);
32703270
expect(response).toMatchObject({
3271-
result_type: AddressScanResultType.Benign,
3271+
result_type: AddressScanResultType.ErrorResult,
32723272
label: '',
32733273
});
32743274
expect(scope.isDone()).toBe(true);
32753275
},
32763276
);
32773277

3278-
it('should return an AddressScanResult with a benign result on timeout', async () => {
3278+
it('will return an AddressScanResult with an ErrorResult on timeout', async () => {
32793279
const scope = nock(SECURITY_ALERTS_BASE_URL)
32803280
.post(ADDRESS_SCAN_ENDPOINT, {
32813281
chain: 'ethereum',
@@ -3288,33 +3288,33 @@ describe('PhishingController', () => {
32883288
clock.tick(5000);
32893289
const response = await promise;
32903290
expect(response).toMatchObject({
3291-
result_type: AddressScanResultType.Benign,
3291+
result_type: AddressScanResultType.ErrorResult,
32923292
label: '',
32933293
});
32943294
expect(scope.isDone()).toBe(false);
32953295
});
32963296

3297-
it('should return a benign result when address is missing', async () => {
3297+
it('will return an AddressScanResult with an ErrorResult when address is missing', async () => {
32983298
const response = await controller.scanAddress(testChainId, '');
32993299
expect(response).toMatchObject({
3300-
result_type: AddressScanResultType.Benign,
3300+
result_type: AddressScanResultType.ErrorResult,
33013301
label: '',
33023302
});
33033303
});
33043304

3305-
it('should return a benign result when chain ID is unknown', async () => {
3305+
it('will return an AddressScanResult with an ErrorResult when chain ID is unknown', async () => {
33063306
const unknownChainId = '0x999999';
33073307
const response = await controller.scanAddress(
33083308
unknownChainId,
33093309
testAddress,
33103310
);
33113311
expect(response).toMatchObject({
3312-
result_type: AddressScanResultType.Benign,
3312+
result_type: AddressScanResultType.ErrorResult,
33133313
label: '',
33143314
});
33153315
});
33163316

3317-
it('should normalize address to lowercase', async () => {
3317+
it('will normalize address to lowercase', async () => {
33183318
const mixedCaseAddress = '0xAbCdEf1234567890123456789012345678901234';
33193319
const scope = nock(SECURITY_ALERTS_BASE_URL)
33203320
.post(ADDRESS_SCAN_ENDPOINT, {
@@ -3331,7 +3331,7 @@ describe('PhishingController', () => {
33313331
expect(scope.isDone()).toBe(true);
33323332
});
33333333

3334-
it('should normalize chain ID to lowercase', async () => {
3334+
it('will normalize chain ID to lowercase', async () => {
33353335
const mixedCaseChainId = '0xA';
33363336
const scope = nock(SECURITY_ALERTS_BASE_URL)
33373337
.post(ADDRESS_SCAN_ENDPOINT, {
@@ -3348,7 +3348,7 @@ describe('PhishingController', () => {
33483348
expect(scope.isDone()).toBe(true);
33493349
});
33503350

3351-
it('should cache scan results and return them on subsequent calls', async () => {
3351+
it('will cache scan results and return them on subsequent calls', async () => {
33523352
const fetchSpy = jest.spyOn(global, 'fetch');
33533353

33543354
const scope = nock(SECURITY_ALERTS_BASE_URL)
@@ -3370,7 +3370,7 @@ describe('PhishingController', () => {
33703370
fetchSpy.mockRestore();
33713371
});
33723372

3373-
it('should cache addresses per chain ID', async () => {
3373+
it('will cache addresses per chain ID', async () => {
33743374
const chainId1 = '0x1';
33753375
const chainId2 = '0x89';
33763376

0 commit comments

Comments
 (0)