Skip to content

Instantly share code, notes, and snippets.

View filepi's full-sized avatar

Felipe filepi

  • Brasil
View GitHub Profile
@arjunattam
arjunattam / redux.test.js
Last active April 5, 2024 21:22
Redux store testing with Playwright
const pw = require('playwright');
(async () => {
const browser = await pw.chromium.launch();
const context = await browser.newContext();
// set addInitScript to run this on every page load in this context
// in the app, use window.IS_PLAYWRIGHT to set window.store = store;
await context.addInitScript('window.IS_PLAYWRIGHT = true;')