REST Service for POPCORN - ILIAS
alex
4 hours ago 24e2d3d3400dcdc84cd4659d2710e83e97a5700c
test/testApiPing.js
@@ -12,21 +12,20 @@
describe("using the API", function () {
    describe("the Route POST /api/ping", function () {
    describe("the Route GET /api/ping", function () {
        it("should return an answer from php component", async function () {
            const url = getUrl(ref_id)
            console.log(url)
            const res = await fetch(url, {
                method: "POST",
                body: JSON.stringify({}),
                method: "GET",
                // body: JSON.stringify({}),
                headers: {
                    'Content-Type': 'application/json', // Indicate JSON data
                },
            })
            // console.log(res)
            const data = await res.json()
            console.log(data)
            // console.log(data)
            expect(data).to.be.a("object")
            expect(data.status).to.equal("ok")