Would the recent changes to Console.js or buffered_console.js cause this?
https://github.com/facebook/jest/compare/v22.1.4...v22.3.0
Yeah, this is #5514. The one from Page.js:648 looks legit, but we should not print the stackframe if there's nothing to log in an assert.
@ranyitz mind taking a look?
@SimenB I agree, I will fix it later on today.
Thank you for the fix. Is there a new release coming for it or perhaps a way to disable the assertions until the official fix?
you should be able to do console.assert = jest.fn() in a setupfile
@SimenB could you be more specific? I'm rather new to Jest, trying to use it with Puppeteer in a regression testing suite. I've created a jest.config.js file and tried to set it there assuming that console.assert were global. That didn't work.
@emilianionascu
yourproject/tests/something.test.js
console.assert = jest.fn();
describe('your Jest test suite start here', () => {
test('your unit test (or whatever you are doing)', () => {
// do something
});
});
works for me.
22.4.0 is released, btw, so this shouldn't be needed anymore
Oh, this wasn't closed.
Most helpful comment
@emilianionascu
works for me.