UNPKG

@wordpress/e2e-test-utils

Version:
24 lines (22 loc) 639 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.switchUserToTest = switchUserToTest; var _getCurrentUser = require("./get-current-user"); var _loginUser = require("./login-user"); var _config = require("./shared/config"); /** * Internal dependencies */ /** * Switches the current user to whichever user we should be * running the tests as (if we're not already that user). */ async function switchUserToTest() { if ((await (0, _getCurrentUser.getCurrentUser)()) === _config.WP_USERNAME) { return; } await (0, _loginUser.loginUser)(); } //# sourceMappingURL=switch-user-to-test.js.map