You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm interested in XBell since I'm working on an editor project (BlockSuite), which requires comprehensive test suite that works across different environments. For this snippet in the documentation:
I'm wondering if it's possible to import third-party packages inside the test case? This allows us to write unit tests in this way:
Yes, XBell allows importing third-party packages.
Thank you very much for your interest in XBell, but XBell may be a little unstable recently.
Because I am refactoring part of its page build to solve the page refresh problem caused by vite.
I would probably stop supporting this because of the ambiguity, for example, javascript in the page already includes a react, and then the developer also imports a react in a test case. The developer might mistakenly think that react is only imported once, but actually import it twice.
You can see if the way below can support your scenario:
test.browser('test the code in browser',async({ expect, page })=>{const{ add }=awaitimport('my-package');constresult=add(1,1);expect(result).toBe(2);window.document.body.innerHTML=result;awaitexpect(page).toMatchScreenshot({name: 'default-screenshot',});});
Hi, I'm interested in XBell since I'm working on an editor project (BlockSuite), which requires comprehensive test suite that works across different environments. For this snippet in the documentation:
I'm wondering if it's possible to import third-party packages inside the test case? This allows us to write unit tests in this way:
I'm not sure if it's possible to import ESM package inside
page.evaluate
, this is a blocker in my scenario.The text was updated successfully, but these errors were encountered: