@11joselu/cypress-to-playwright
Version:
Automatic migration from cypress to playwright
9 lines • 505 B
JavaScript
import { PLAYWRIGHT_PAGE_NAME } from '../playwright.js';
import { fixString } from './fix-string.js';
export function handle(node, factory) {
const call = node.expression;
const name = call.arguments[0].getText();
const callback = call.arguments[1];
return factory.function(fixString(name), [...callback.parameters, factory.parameter(PLAYWRIGHT_PAGE_NAME)], callback.body || factory.emptyBlock(), [factory.exportToken(), factory.asyncToken()]);
}
//# sourceMappingURL=custom-command.js.map