diff --git a/package.json b/package.json index cd944d7..7ea0900 100644 --- a/package.json +++ b/package.json @@ -52,4 +52,4 @@ "path": "./node_modules/cz-conventional-changelog" } } -} \ No newline at end of file +} diff --git a/tests/integration/api/v1/migrations/post.test.js b/tests/integration/api/v1/migrations/post.test.js index 6efad49..5ae6c1e 100644 --- a/tests/integration/api/v1/migrations/post.test.js +++ b/tests/integration/api/v1/migrations/post.test.js @@ -10,9 +10,12 @@ describe("POST /api/v1/migrations", () => { describe("Anonymous user", () => { describe("Running pending migrations", () => { test("For the first time", async () => { - const response = await fetch("http://localhost:3000/api/v1/migrations", { - method: "POST", - }); + const response = await fetch( + "http://localhost:3000/api/v1/migrations", + { + method: "POST", + }, + ); expect(response.status).toBe(201); @@ -20,13 +23,15 @@ describe("POST /api/v1/migrations", () => { expect(Array.isArray(responseBody)).toBe(true); expect(responseBody.length).toBeGreaterThan(0); - }); test("For the second time", async () => { - const response = await fetch("http://localhost:3000/api/v1/migrations", { - method: "POST", - }); + const response = await fetch( + "http://localhost:3000/api/v1/migrations", + { + method: "POST", + }, + ); expect(response.status).toBe(200); @@ -39,8 +44,6 @@ describe("POST /api/v1/migrations", () => { }); }); - - // Only test => indica ao jest que execute apneas esse test e pule o demais! // test.only("Teste de SQL Injection", async () => { // await fetch("http://localhost:3000/api/v1/status?databaseName='; SELECT pg_sleep(4); --"); diff --git a/tests/orchestrator.js b/tests/orchestrator.js index b0e7e14..68c4328 100644 --- a/tests/orchestrator.js +++ b/tests/orchestrator.js @@ -26,6 +26,7 @@ async function clearDatabase() { const orchestrator = { waitForAllServices, - clearDatabase + clearDatabase, }; + export default orchestrator;