Skip to content

Commit a5645bf

Browse files
ReenaRajaniticidesign
authored andcommitted
add the api-node-imdb (#65)
1 parent 0b2a823 commit a5645bf

File tree

5 files changed

+75
-0
lines changed

5 files changed

+75
-0
lines changed

2018/13-09-2018/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* **Format:** Mob Programming
2+
* **Katas:** FizzBuzz/Scrabble , api-node-imdb
3+
* **Where:** Arbor Networks
4+
* **When:** 13/08/2018
5+
6+
<img src="https://secure.meetupstatic.com/photos/event/3/a/b/a/highres_474555034.jpeg" width="600px" />
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
This is a Kata which aims at developing a Node API for creating a personal Movie Database using Test Driven Development[TDD] approach
2+
3+
## Requirements
4+
- good understanding of JavaScript
5+
- basic knowledge of server/client request/response
6+
- basic understanding of HTTP
7+
- basic understanding of GIT
8+
9+
## Development using
10+
- Node.js
11+
- MongoDB
12+
- TDD approach
13+
- [Postman](https://www.getpostman.com/) - API development environment
14+
- [Robo 3T](https://robomongo.org/) - a free lightweight GUI for MongoDB enthusiasts
15+
16+
17+
## User Story 1
18+
1. As a User I want to insert movie information to create my own movie database.
19+
20+
### Acceptance Criteria
21+
- The movie to be inserted must have title and description
22+
- User cannot enter the same movie name again i.e duplicates must be tracked based on the title of the movie
23+
- The user must send the data to the API in JSON format
24+
25+
## User Story 2
26+
Coming soon...
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const createMovie = (title, description) => {
2+
if (title === "") {
3+
return "Movie title was required"
4+
}
5+
else {
6+
return "Movie description was required"
7+
}
8+
}
9+
10+
module.exports=createMovie;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
const createMovie = require("./create-movie");
2+
3+
4+
describe('Create movie', () => {
5+
it('Requires movie with a title', () => {
6+
const title = "";
7+
const description = "some description here";
8+
expect(createMovie(title, description)).toBe('Movie title was required');
9+
});
10+
11+
it('Requires movie with a description', () => {
12+
const title = "Star Wars";
13+
const description = "";
14+
expect(createMovie(title, description)).toBe('Movie description was required');
15+
});
16+
17+
18+
});
19+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "api-node-imbd",
3+
"version": "1.0.0",
4+
"description": "a kata to learn about building an Node API from scratch",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "jest --watch"
8+
},
9+
"author": "Coding Dojo Team",
10+
"license": "ISC",
11+
"devDependencies": {
12+
"jest": "^23.6.0"
13+
}
14+
}

0 commit comments

Comments
 (0)