Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsua committed Jun 2, 2022
1 parent c21b6c7 commit 138d668
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 40 deletions.
13 changes: 0 additions & 13 deletions backend/insertionsNested.test.js
Expand Up @@ -110,19 +110,6 @@ describe("POST /api/v2/parkings/:parkId/insertions", () => {
afterAll(async () => {
await cleanDB()
await mongoose.connection.close()
console.log("CONN", mongoose.connection.readyState);

const directory = './static/uploads';

const fileNames = await fs.promises.readdir(directory)

for (const file of fileNames) {
if (file !== ".gitkeep") {
fs.unlink(path.join(directory, file), err => {
if (err) throw err;
});
}
}
})

test("POST /api/v2/parkings/:parkId/insertions with non-existing parking in DB respond with 404", async () => {
Expand Down
13 changes: 0 additions & 13 deletions backend/parkings.test.js
Expand Up @@ -62,19 +62,6 @@ describe("POST /api/v2/parkings", () => {
afterAll(async () => {
await cleanDB()
await mongoose.connection.close()
console.log("CONN", mongoose.connection.readyState);

const directory = './static/uploads';

const fileNames = await fs.promises.readdir(directory)

for (const file of fileNames) {
if (file !== ".gitkeep") {
fs.unlink(path.join(directory, file), err => {
if (err) throw err;
});
}
}
})

test('POST /api/v2/parkings should respond with 201', async () => {
Expand Down
14 changes: 0 additions & 14 deletions backend/reservationsNested.test.js
Expand Up @@ -148,21 +148,7 @@ describe("POST /api/v2/insertions/:insertionId/reservations", () => {
afterAll(async () => {
await cleanDB()
await mongoose.connection.close()
console.log("CONN", mongoose.connection.readyState);
await mongoServer.stop()
console.log("MONGO CONN", mongoServer.state)

const directory = './static/uploads';

const fileNames = await fs.promises.readdir(directory)

for (const file of fileNames) {
if (file !== ".gitkeep") {
fs.unlink(path.join(directory, file), err => {
if (err) throw err;
});
}
}
})

test("POST /api/v2/insertions/:insertionId/reservations with non-existing insertion, should respond with 404", async () => {
Expand Down

0 comments on commit 138d668

Please sign in to comment.