- 
                Notifications
    You must be signed in to change notification settings 
- Fork 108
Migrate to Vitest #1815
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
          
     Open
      
      
            leeyi45
  wants to merge
  74
  commits into
  master
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
vitest-testing-refactor
  
      
      
   
  
    
  
  
  
 
  
      
    base: master
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.
          
          
                
     Open
            
            Migrate to Vitest #1815
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
    
  
  
    
    # Conflicts: # package.json # src/parser/__tests__/disallowed-syntax.test.ts # src/repl/utils.ts # src/utils/operators.ts # tsconfig.json # yarn.lock
| Vitest is failing in the CI, this is a known issue: vitest-dev/vitest#6511 | 
…esting-refactor # Conflicts: # src/__tests__/index.test.ts # src/__tests__/tailcall-return.test.ts # src/infiniteLoops/__tests__/errors.test.ts # src/infiniteLoops/__tests__/instrument.test.ts # src/infiniteLoops/__tests__/runtime.test.ts # src/infiniteLoops/__tests__/symbolic.test.ts # src/infiniteLoops/detect.ts # src/infiniteLoops/instrument.ts # src/infiniteLoops/runtime.ts # src/infiniteLoops/state.ts # src/infiniteLoops/symbolic.ts # src/runner/sourceRunner.ts # src/stdlib/__tests__/stream.test.ts
…esting-refactor # Conflicts: # src/tracer/__tests__/tracer_debug.test.ts
  
    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.
  
    
  
    
Migrate to Vitest
Following the modules repo and frontend, this PR migrates the repository to Vitest. I've tried to minimize changes where possible since Vitest was designed as a drop in for Jest, but unlike Jest Vitest requires calls to
toMatchInlineSnapshotto be directly fromexpect.Relocation of Enums
The Chapter, Variant, ErrorType and ErrorSeverity enums needed to be relocated to other files to allow Vitest to actually work. I suspect it has something to do with the circular imports that aren't just elided during runtime.
I'm not sure if they should be re-exported through the
types.tsfile though.