Created
December 30, 2019 13:11
-
-
Save gnschenker/ff804268d2744acf538fbb6d4de46b42 to your computer and use it in GitHub Desktop.
First outside-in test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("Suite to test the glossary API", () => { | |
const https = require('https'); | |
const httpsAgent = new https.Agent({ rejectUnauthorized: false }); | |
const axios = require('axios'); | |
const baseUrl = `https://localhost:5001/api`; | |
const client = axios.create({ | |
baseURL: baseUrl, | |
httpsAgent | |
}) | |
describe("when calling /glossary", () => { | |
it("should return list of glossaries", async () => { | |
const response = await client.get('glossary'); | |
expect(response.status).toBe(200); | |
expect(response.data.length).toBeGreaterThan(0); | |
expect(response.data[0].term).toBe('AccessToken'); | |
}) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment