File tree Expand file tree Collapse file tree 5 files changed +75
-0
lines changed
Expand file tree Collapse file tree 5 files changed +75
-0
lines changed Original file line number Diff line number Diff line change 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 " />
Original file line number Diff line number Diff line change 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...
Original file line number Diff line number Diff line change 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 ;
Original file line number Diff line number Diff line change 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+
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments