Skip to content

Commit

Permalink
edited test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzadtomal committed Jan 4, 2024
1 parent 92ad3f6 commit dc3b492
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server/src/routes/launches/launches.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ describe("Launches API",()=>{
test("It should catch Invalid Dates",async ()=>{
const response=await request(app).post("/v1/launches")
.send(lauchDataWithInvalidDate).expect("Content-Type",/json/)
.expect(400).expect(response.body).toStrictEqual({
error:"Invalid launch date"
})
.expect(400)

expect(response.body).toStrictEqual({
error: 'Invalid launch date',
});
})

// test("It should catch Invalid Dates", ()=>{})
Expand Down
2 changes: 2 additions & 0 deletions server/src/services/mongo.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require("dotenv").config();

const mongoose=require("mongoose");


Expand Down

0 comments on commit dc3b492

Please sign in to comment.