Skip to content

Commit

Permalink
style: add missing , to orchestrator.js file and line break in ot…
Browse files Browse the repository at this point in the history
…her files
  • Loading branch information
joseallef authored Sep 14, 2024
1 parent 852dd80 commit f2840f5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@
"path": "./node_modules/cz-conventional-changelog"
}
}
}
}
21 changes: 12 additions & 9 deletions tests/integration/api/v1/migrations/post.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,28 @@ 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);

const responseBody = await response.json();

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);

Expand All @@ -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); --");
Expand Down
3 changes: 2 additions & 1 deletion tests/orchestrator.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ async function clearDatabase() {

const orchestrator = {
waitForAllServices,
clearDatabase
clearDatabase,
};

export default orchestrator;

0 comments on commit f2840f5

Please sign in to comment.