Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "jest": {
- "globalSetup": "./setup.js"
- }
- const axios = require('axios');
- async function getSessionKey() {
- const response = await axios.post("http://apiUrl", {
- username: "K",
- password: "passw0rd"
- });
- sessionKey = response.data.sessionKey;
- global.sessionKey = sessionKey;
- }
- module.exports = getSessionKey;
- test("create session", () => {
- expect(global.sessionKey).toBeTruthy();
- });
Add Comment
Please, Sign In to add comment