Files
Online-Topup-V1/application/tests/login.test.js
T
2022-09-09 14:50:06 +07:00

21 lines
491 B
JavaScript

const request = require("supertest");
const app = require("../../server");
require("dotenv").config();
let token = "";
beforeAll(async () => {
const res = await request(app).post("/api/login").send({
email: "C-ACCESS.ONLINETOPUP@KRL.CO.ID",
password: "106C231o",
});
code = res.body.code;
token = res.body.data.access_token;
});
describe("TOKEN transaction is generate", () => {
it("should test that get code 00 == 00", () => {
expect(code).toEqual("00");
});
});