webcontainer-core
                                
                                 webcontainer-core copied to clipboard
                                
                                    webcontainer-core copied to clipboard
                            
                            
                            
                        Running Jest or Vitest in Webcontainers doesn't exit with status 1
Describe the bug
I installed jest in a new nodejs webcontainer and wrote a basic test that fails. I ran it using yarn jest and jest didn't exit with status 0
Link to the blitz that caused the error
https://stackblitz.com/edit/stackblitz-starters-kdtmv1?description=Starter%20project%20for%20Node.js,%20a%20JavaScript%20runtime%20built%20on%20Chrome%27s%20V8%20JavaScript%20engine&file=test.spec.ts&title=node.new%20Starter
Steps to reproduce
- Create a new nodejs webcontainer
- Install jest
- Create a new test file index.spec.tswith given content
describe('It Should Work', () => {
  it("Should work",()=>{
  expect(1).toBe(2);
  })  
 });
- Run yarn jestin terminal
- The yarn doesn't show the error Command failed with exit code 1.instead showsDone in 2.05s
Expected behavior
It should throw status 1
Parity with Local
- [X] I have run the project in my local machine and I could not reproduce the issue.
Screenshots
Platform
Browser name  = Chrome
Full version  = 120.0.0.0
Major version = 120
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 128021926,
  "usedJSHeapSize": 107930550,
  "jsHeapSizeLimit": 4294705152
}
Hash = 3f7046a7
Additional context
No response
Thanks for the report, it does seem we deviate from the expected behavior.