Page MenuHomePhabricator

upgrading jest to latest
AbandonedPublic

Authored by darn-it-dan on Jan 20 2022, 13:40.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Summary

This is just upgrading jest to latest.

This revision is part of a greater plan to upgrade the full project to latest versions.

Jest was the easiest one to upgrade since it doesn't have any runtime implications.

Jest 27 requires update es-lint plugins, babel plugins, and a slight change in how we write our test.

Also Jest 27 does not come with Jasmine configured by default which is why it's enabled manually.
Also JSDOM is now native to Jest 27 which means we can delete jsdom-environment npm

Test Plan

for the most part run npm test,
make sure all the tests are passing.
run the app and make sure nothing too crazy happened, (i suspect there shouldn't be any effect there)

Diff Detail

Repository
rABC Bitcoin ABC
Branch
master
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17948
Build 35718: Build Diffcashtab-tests
Build 35717: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Jan 20 2022, 13:40

Tail of the build log:

  WalletLabel.js                 |       0 |        0 |       0 |       0 | 5-26                                                                                                                                                                                                                                                                                     
 src/components/Configure        |   40.64 |     22.1 |   28.84 |    40.9 |                                                                                                                                                                                                                                                                                          
  Configure.js                   |   40.64 |     22.1 |   28.84 |    40.9 | 80,114,153-166,180-191,274-275,279-280,284-285,288-290,297,315,323-335,343-365,369-375,379-405,409-437,441-449,453-460,464-475,486-705                                                                                                                                                   
 src/components/OnBoarding       |   44.82 |     8.33 |      25 |   46.42 |                                                                                                                                                                                                                                                                                          
  OnBoarding.js                  |   44.82 |     8.33 |      25 |   46.42 | 45-56,60-79,109-144                                                                                                                                                                                                                                                                      
 src/components/Send             |   28.65 |    30.25 |   15.62 |   29.52 |                                                                                                                                                                                                                                                                                          
  Send.js                        |   28.38 |    33.12 |   12.76 |   29.64 | 128-132,136,140-141,145,167,182-339,345-401,408-466,473-475,484,488-498,505-511,516-534,538-539,545-566,600,660-991                                                                                                                                                                      
  SendToken.js                   |   29.34 |    24.35 |   23.52 |   29.21 | 61-64,70-127,132-156,163-201,209-220,261-345                                                                                                                                                                                                                                             
 src/components/Tokens           |   26.21 |       40 |    4.44 |   26.47 |                                                                                                                                                                                                                                                                                          
  CreateTokenForm.js             |   22.95 |    32.29 |    2.32 |   23.19 | 76,80-109,114,118-202,207-208,214-232,237-243,253-256,263-266,274-284,292-297,306-309,331-382,390-451,459-770,792                                                                                                                                                                        
  Tokens.js                      |      90 |    78.94 |      50 |      90 | 119                                                                                                                                                                                                                                                                                      
 src/components/Wallet           |   62.72 |     22.5 |   28.84 |   62.72 |                                                                                                                                                                                                                                                                                          
  TokenList.js                   |     100 |      100 |     100 |     100 |                                                                                                                                                                                                                                                                                          
  TokenListItem.js               |     100 |       50 |     100 |     100 | 40                                                                                                                                                                                                                                                                                       
  Tx.js                          |   56.09 |        0 |       0 |   56.09 | 17,20,23,26,56,60,65,83,87,112,129,180-182,198-207                                                                                                                                                                                                                                       
  TxHistory.js                   |      60 |      100 |       0 |      60 | 9-12                                                                                                                                                                                                                                                                                     
  Wallet.js                      |   58.82 |       50 |      30 |   58.82 | 38,48-55,63,111-127,137-154,180,250-273                                                                                                                                                                                                                                                  
 src/hooks                       |   38.24 |    35.77 |   31.38 |   38.15 |                                                                                                                                                                                                                                                                                          
  useAsyncTimeout.js             |   77.77 |       50 |   83.33 |   82.35 | 20,25-26                                                                                                                                                                                                                                                                                 
  useBCH.js                      |   59.92 |    57.14 |      50 |   59.51 | 115-116,161,179-182,202-203,213-258,266,273-274,340-356,362-378,383-411,473-499,509-525,534-543,548-578,583-589,597-640,663-671,770,816,848-850,898,905,907,909,914,927-933,944-1106,1110-1118,1151,1169-1170,1197,1221,1254,1260-1263,1299,1342,1345,1414,1421,1423,1425,1430,1440-1443 
  useImage.js                    |       0 |        0 |       0 |       0 | 1-199                                                                                                                                                                                                                                                                                    
  useInnerScroll.js              |       0 |      100 |       0 |       0 | 3-6                                                                                                                                                                                                                                                                                      
  useInterval.js                 |       0 |      100 |       0 |       0 | 3-16                                                                                                                                                                                                                                                                                     
  usePrevious.js                 |     100 |      100 |     100 |     100 |                                                                                                                                                                                                                                                                                          
  useWallet.js                   |   23.09 |    15.44 |   36.58 |   23.52 | 54-81,87-95,99-103,113-115,131-135,147-190,200-303,313-314,345-349,365-371,386,410-432,437-442,451-481,492-512,523-640,646-680,689-726,731-780,784-810,819-829,851-855,863-864,874-879,884,890-931,944,966-1037,1071-1089,1114-1133                                                      
  useWebAuthentication.js        |    1.51 |        0 |       0 |    1.56 | 12-233                                                                                                                                                                                                                                                                                   
  useWindowDimensions.js         |   77.77 |      100 |      60 |    87.5 | 21                                                                                                                                                                                                                                                                                       
 src/utils                       |   77.67 |    81.28 |   65.45 |    77.6 |                                                                                                                                                                                                                                                                                          
  GoogleAnalytics.js             |   27.27 |        0 |   14.28 |   28.57 | 9-39,54-60                                                                                                                                                                                                                                                                               
  cashMethods.js                 |   84.18 |    83.75 |      90 |   83.43 | 12,59,195,246,255,277,317,331,404-456,466                                                                                                                                                                                                                                                
  context.js                     |      50 |      100 |       0 |      50 | 6-7,19-21                                                                                                                                                                                                                                                                                
  convertArrBuffBase64.js        |      20 |      100 |       0 |   22.22 | 3-10,15-18                                                                                                                                                                                                                                                                               
  debounce.js                    |       0 |        0 |       0 |       0 | 4-8                                                                                                                                                                                                                                                                                      
  formatting.js                  |   78.12 |    76.92 |     100 |   78.12 | 15,25,43,53,68-70                                                                                                                                                                                                                                                                        
  retry.js                       |       0 |        0 |       0 |       0 | 1-8                                                                                                                                                                                                                                                                                      
  tokenMethods.js                |     100 |      100 |     100 |     100 |                                                                                                                                                                                                                                                                                          
  validation.js                  |   98.59 |    96.77 |     100 |   98.59 | 133                                                                                                                                                                                                                                                                                      
 src/utils/icons                 |    2.52 |        0 |       0 |    2.72 |                                                                                                                                                                                                                                                                                          
  cropImage.js                   |    2.27 |        0 |       0 |    2.43 | 2-78                                                                                                                                                                                                                                                                                     
  resizeImage.js                 |    2.77 |        0 |       0 |    3.03 | 2-51                                                                                                                                                                                                                                                                                     
  roundImage.js                  |    2.56 |        0 |       0 |    2.77 | 2-57                                                                                                                                                                                                                                                                                     
---------------------------------|---------|----------|---------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

##teamcity[blockOpened name='Code Coverage Summary']
##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='1218']
##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='2928']
##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='498']
##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='1284']
##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='206']
##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='617']
##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='1189']
##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='2843']
##teamcity[blockClosed name='Code Coverage Summary']

Test Suites: 1 failed, 15 passed, 16 total
Tests:       2 failed, 233 passed, 235 total
Snapshots:   23 passed, 23 total
Time:        14.343 s
Ran all test suites.
Build cashtab-tests failed with exit code 1

did not create a new branch for this like a dumbass.