- 
                Notifications
    You must be signed in to change notification settings 
- Fork 405
replace jasmine with vitest #1803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Draft
      
      
            dynst
  wants to merge
  26
  commits into
  cosmos:main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
dynst:vitest-it
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
                
     Draft
            
            
          Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    886315e    to
    25f8e03      
    Compare
  
    4382591    to
    9165c6b      
    Compare
  
    | Why is there a  cosmjs/.github/workflows/test.yml Line 103 in 8fb7421 
 Line 154 in 31db121 
 Is there another way to do whatever it is it's doing? Edit: #1850 | 
c450087    to
    8c5bf0a      
    Compare
  
    This advertises the minimum node version in the shields.io badge.
In a local test it took 9.8s to complete.
Even given the comment, 1s might be excessively large.
"process them later" test and "broken off" test
It took about 7.5s in testing. It seems slower in Vitest than Jasmine oddly, the server side delay is only 5s.
and use the same filename as all other packages use, testutils with an S for consistency.
And here's no testdata/ directory in this package, only in cosmwasm-stargate, so delete that glob.
189d01f    to
    a55d9a3      
    Compare
  
    e955ff2    to
    5a8c47a      
    Compare
  
    
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Vitest has decent defaults so a configuration file may not even be required.
Blocked on:
#1809 & #1832 & #1833 #1004
Converting is easy now that
xitis in use:And
--quietis passed by the coverage script, so that has to be removed when replacing the Jasmine CJS file.cosmjs/packages/utils/jasmine-testrunner.cjs
Line 29 in ca243f5
cosmjs/packages/utils/package.json
Line 35 in ca243f5
The default timeout in Vitest is 5s but some tests need longer than that. The slow server tests have a 5s server-side delay, so:
sockettests that spawn child processes withexec()are heavily entangled with the others. If one test times out, it causes completely unrelated tests to fail. And they can't be run in parallel (Vitest has per-spec-file parallelism by default).cosmjs/packages/socket/src/reconnectingsocket.spec.ts
Lines 206 to 209 in ca243f5