-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore deploy to heroku #36
base: develop
Are you sure you want to change the base?
Conversation
Setup API for user signup
Add API for user sign in
Ft add recipe api-152046467
Setup API for the modification of a recipe by an authenticated user - #152046516
Add API that allows logged-in users to retreive all recipes in the application - #152352790
Add API for the posting of review by an authenticated user - #152046736
Add API enpoint for the deleting of recipes by an authenticated user - #152046612
Add API that enables users get their favorite recipes - #152046694
Ft api sort votes 152046874
Add API for sending notifications to users
Add dot.env file to application so as to protect important tokens
- redesign user-interface of the application - implement toastr to alert user of actions - fix bug in delete recipe functionality
- implement review for recipe - add emoji to application - install react-emoji-render - setup 404 page - handle individual errors
- write tests for actions and action creators - write tests for reducers - fix bug in add recipe feature - refactor dashboard component - setup jest - install expect package - install moxios - install redux-mock-store
- add more tests for reducers - refactor reducers
- modify files to prepare for final deployment
- modify files to prepare for final deployment
- fix bug in signup and signin component - modify code to use jsdoc
- remove console.log statement from component
- remove console.log statement from component
- refactor travis file
- refactor travis file
- refactor travis file
- refactor travis file
- refactor travis file
- refactor travis file
- refactor travis file
instructions: '[Array, of, instructions]', | ||
}]; | ||
|
||
export default recipes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'export' is only available in ES6 (use 'esversion: 6').
@@ -0,0 +1,19 @@ | |||
const recipes = [{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
content: 'Amazing recipe you got there man', | ||
}; | ||
|
||
export default reviews; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'export' is only available in ES6 (use 'esversion: 6').
@@ -0,0 +1,6 @@ | |||
const reviews = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
expect(res.status).to.equal(400); | ||
expect(res.body.message).to.equal('Name is required.'); | ||
done(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrecoverable syntax error. (18% scanned).
); | ||
it('Should successfully create a recipe as a logged in user', (done) => { | ||
const testUser = { ...users[0] }; | ||
request.post(`${recipesApi}?token=${testUser.tokens[0].token}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'template literal syntax' is only available in ES6 (use 'esversion: 6').
} | ||
); | ||
it('Should successfully create a recipe as a logged in user', (done) => { | ||
const testUser = { ...users[0] }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Expected '}' to match '{' from line 30 and instead saw '...'.
Missing semicolon.
Expected an assignment or function call and instead saw an expression.
Expected ')' and instead saw ';'.
}); | ||
} | ||
); | ||
it('Should successfully create a recipe as a logged in user', (done) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
.set('Content-Type', 'application/json') | ||
.type('form') | ||
.send(recipes[0]) | ||
.end((err, res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
describe('#Test Creating a new Recipe', () => { | ||
it( | ||
'Should return a 403 when a user tries to create a recipe without a token', | ||
(done) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! I feel you should gitignore
your public folder.
Why?
It's not really a good idea to push your bundled files to version control, it should be a. user generatede thing.
Also, files like .DS_Store
should be ignored.
"plugins": [ | ||
"transform-react-jsx", | ||
"transform-class-properties", | ||
"transform-object-rest-spread" | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a new line here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback. Implemented it.
ratings: | ||
paths: | ||
- "server/**/*.js" | ||
- "client/**/*.js" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you can target both .js
and .jsx
files with this line client/**/*.{js,jsx}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback. Implemented it.
- "client/src/__tests__" | ||
- "server/migrations" | ||
- "server/models" | ||
- "server/seeders" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New line needed here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback. Implemented it.
env: | ||
global: | ||
- NODE_ENV=test | ||
- CC_TEST_REPORTER_ID=1944fd38c05bd77f1f23b769f5e0753618ad880b9317d37b6b8c985d37587594 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is safe to push to version control. If it isn't you should look into encrypting it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback. Implemented it.
|
||
after_success: | ||
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a new line here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback. Implemented it.
} | ||
} | ||
|
||
onUsernameChange(event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can make use of one onChange method for all inputs
@@ -0,0 +1,23 @@ | |||
import React from 'react'; | |||
import ReactDOM from 'react-dom'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of importing the whole ReactDOM
package, why not import what you need.
import { render } from 'react-dom';
|
||
const store = configureStore(); | ||
|
||
if (localStorage.authToken) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read the article about localStorage
.render( | ||
<Provider store={store}> | ||
<App /> | ||
</Provider>, document.getElementById('root')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick
New line needed here.
adapter: postgres | ||
database: more_recipes_test | ||
username: bill | ||
password: rocketmail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick
New line needed here.
@@ -0,0 +1 @@ | |||
"use strict";function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}var precacheConfig=[["/index.html","eb657bf261c4ab789cd793da99d3f7fa"],["/static/css/main.7cf33c00.css","46f792d383b5e2f870454414ed0bc7d2"],["/static/js/main.7065254e.js","2b4f759bc791fda57a1e267422dd9a01"],["/static/media/cookies.1a59c333.jpeg","1a59c33306fbf49f9009b4c1b093a0ce"],["/static/media/dessert.0760c662.jpeg","0760c662e9529adcee1fef6551de5a7c"],["/static/media/fontawesome-webfont.674f50d2.eot","674f50d287a8c48dc19ba404d20fe713"],["/static/media/fontawesome-webfont.912ec66d.svg","912ec66d7572ff821749319396470bde"],["/static/media/fontawesome-webfont.af7ae505.woff2","af7ae505a9eed503f8b8e6982036873e"],["/static/media/fontawesome-webfont.b06871f2.ttf","b06871f281fee6b241d60582ae9369b9"],["/static/media/fontawesome-webfont.fee66e71.woff","fee66e712a8a08eef5805a46892932ad"],["/static/media/pancakes.30892fc8.jpeg","30892fc8000a03c65d8552729c2d28ad"],["/static/media/pizzza.cba2d80e.jpg","cba2d80ed4c200dc6f80c88dbb6b5476"]],cacheName="sw-precache-v3-sw-precache-webpack-plugin-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var n=new URL(e);return"/"===n.pathname.slice(-1)&&(n.pathname+=t),n.toString()},cleanResponse=function(e){if(!e.redirected)return Promise.resolve(e);return("body"in e?Promise.resolve(e.body):e.blob()).then(function(t){return new Response(t,{headers:e.headers,status:e.status,statusText:e.statusText})})},createCacheKey=function(e,t,n,a){var r=new URL(e);return a&&r.pathname.match(a)||(r.search+=(r.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(n)),r.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var n=new URL(t).pathname;return e.some(function(e){return n.match(e)})},stripIgnoredUrlParameters=function(e,t){var n=new URL(e);return n.hash="",n.search=n.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(e){return t.every(function(t){return!t.test(e[0])})}).map(function(e){return e.join("=")}).join("&"),n.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],n=e[1],a=new URL(t,self.location),r=createCacheKey(a,hashParamName,n,/\.\w{8}\./);return[a.toString(),r]}));self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(e){return setOfCachedUrls(e).then(function(t){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(n){if(!t.has(n)){var a=new Request(n,{credentials:"same-origin"});return fetch(a).then(function(t){if(!t.ok)throw new Error("Request for "+n+" returned a response with status "+t.status);return cleanResponse(t).then(function(t){return e.put(n,t)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var t=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(e){return e.keys().then(function(n){return Promise.all(n.map(function(n){if(!t.has(n.url))return e.delete(n)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(e){if("GET"===e.request.method){var t,n=stripIgnoredUrlParameters(e.request.url,ignoreUrlParametersMatching),a="index.html";(t=urlsToCacheKeys.has(n))||(n=addDirectoryIndex(n,a),t=urlsToCacheKeys.has(n));var r="/index.html";!t&&"navigate"===e.request.mode&&isPathWhitelisted(["^(?!\\/__).*"],e.request.url)&&(n=new URL(r,self.location).toString(),t=urlsToCacheKeys.has(n)),t&&e.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(n)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(t){return console.warn('Couldn\'t serve response for "%s" from cache: %O',e.request.url,t),fetch(e.request)}))}}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the function form of "use strict".
Missing semicolon.
Expected an assignment or function call and instead saw an expression.
'Set' is not defined.
'self' is not defined.
'URL' is not defined.
Too many errors. (100% scanned).
@@ -1,7 +1,7 @@ | |||
import http from 'http'; | |||
import app from '../app'; | |||
|
|||
const port = parseInt(process.env.PORT, 10) || 8080; | |||
const port = parseInt(process.env.PORT, 10) || 8000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
res.sendFile(path.join(appPath, '/index.html')); | ||
}); | ||
|
||
app.get('*', (req, res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
app.get('*', (req, res) => res.status(200).send({ | ||
message: 'Welcome to the beginning of aawesomeness', | ||
})); | ||
app.get('*', (req, res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
app.use(bodyParser.json()); | ||
app.use(express.static(appPath)); | ||
app.use(express.static('public')); | ||
app.use((req, res, next) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
); | ||
it( | ||
'Should successfully downvote a recipe by an authenticated user', | ||
(done) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
.set('Cconnection', 'keep alive') | ||
.set('Content-Type', 'application/json') | ||
.type('form') | ||
.end((err, res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
it( | ||
'Should successfully upvote a recipe by an authenticated user', | ||
(done) => { | ||
request.post(`${recipesApi}/${recipe[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'template literal syntax' is only available in ES6 (use 'esversion: 6').
); | ||
it( | ||
'Should successfully upvote a recipe by an authenticated user', | ||
(done) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
.set('Connection', 'keep alive') | ||
.set('Content-Type', 'application/json') | ||
.type('form') | ||
.end((err, res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
@@ -0,0 +1 @@ | |||
"use strict";function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}var precacheConfig=[["/index.html","eb657bf261c4ab789cd793da99d3f7fa"],["/static/css/main.7cf33c00.css","46f792d383b5e2f870454414ed0bc7d2"],["/static/js/main.7065254e.js","2b4f759bc791fda57a1e267422dd9a01"],["/static/media/cookies.1a59c333.jpeg","1a59c33306fbf49f9009b4c1b093a0ce"],["/static/media/dessert.0760c662.jpeg","0760c662e9529adcee1fef6551de5a7c"],["/static/media/fontawesome-webfont.674f50d2.eot","674f50d287a8c48dc19ba404d20fe713"],["/static/media/fontawesome-webfont.912ec66d.svg","912ec66d7572ff821749319396470bde"],["/static/media/fontawesome-webfont.af7ae505.woff2","af7ae505a9eed503f8b8e6982036873e"],["/static/media/fontawesome-webfont.b06871f2.ttf","b06871f281fee6b241d60582ae9369b9"],["/static/media/fontawesome-webfont.fee66e71.woff","fee66e712a8a08eef5805a46892932ad"],["/static/media/pancakes.30892fc8.jpeg","30892fc8000a03c65d8552729c2d28ad"],["/static/media/pizzza.cba2d80e.jpg","cba2d80ed4c200dc6f80c88dbb6b5476"]],cacheName="sw-precache-v3-sw-precache-webpack-plugin-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var n=new URL(e);return"/"===n.pathname.slice(-1)&&(n.pathname+=t),n.toString()},cleanResponse=function(e){if(!e.redirected)return Promise.resolve(e);return("body"in e?Promise.resolve(e.body):e.blob()).then(function(t){return new Response(t,{headers:e.headers,status:e.status,statusText:e.statusText})})},createCacheKey=function(e,t,n,a){var r=new URL(e);return a&&r.pathname.match(a)||(r.search+=(r.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(n)),r.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var n=new URL(t).pathname;return e.some(function(e){return n.match(e)})},stripIgnoredUrlParameters=function(e,t){var n=new URL(e);return n.hash="",n.search=n.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(e){return t.every(function(t){return!t.test(e[0])})}).map(function(e){return e.join("=")}).join("&"),n.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],n=e[1],a=new URL(t,self.location),r=createCacheKey(a,hashParamName,n,/\.\w{8}\./);return[a.toString(),r]}));self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(e){return setOfCachedUrls(e).then(function(t){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(n){if(!t.has(n)){var a=new Request(n,{credentials:"same-origin"});return fetch(a).then(function(t){if(!t.ok)throw new Error("Request for "+n+" returned a response with status "+t.status);return cleanResponse(t).then(function(t){return e.put(n,t)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var t=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(e){return e.keys().then(function(n){return Promise.all(n.map(function(n){if(!t.has(n.url))return e.delete(n)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(e){if("GET"===e.request.method){var t,n=stripIgnoredUrlParameters(e.request.url,ignoreUrlParametersMatching),a="index.html";(t=urlsToCacheKeys.has(n))||(n=addDirectoryIndex(n,a),t=urlsToCacheKeys.has(n));var r="/index.html";!t&&"navigate"===e.request.mode&&isPathWhitelisted(["^(?!\\/__).*"],e.request.url)&&(n=new URL(r,self.location).toString(),t=urlsToCacheKeys.has(n)),t&&e.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(n)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(t){return console.warn('Couldn\'t serve response for "%s" from cache: %O',e.request.url,t),fetch(e.request)}))}}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the function form of "use strict".
Missing semicolon.
Expected an assignment or function call and instead saw an expression.
'Set' is not defined.
'self' is not defined.
'URL' is not defined.
Too many errors. (100% scanned).
@@ -1,7 +1,7 @@ | |||
import http from 'http'; | |||
import app from '../app'; | |||
|
|||
const port = parseInt(process.env.PORT, 10) || 8080; | |||
const port = parseInt(process.env.PORT, 10) || 8000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
res.sendFile(path.join(appPath, '/index.html')); | ||
}); | ||
|
||
app.get('*', (req, res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
app.get('*', (req, res) => res.status(200).send({ | ||
message: 'Welcome to the beginning of aawesomeness', | ||
})); | ||
app.get('*', (req, res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
app.use(bodyParser.json()); | ||
app.use(express.static(appPath)); | ||
app.use(express.static('public')); | ||
app.use((req, res, next) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
); | ||
it( | ||
'Should successfully downvote a recipe by an authenticated user', | ||
(done) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
.set('Cconnection', 'keep alive') | ||
.set('Content-Type', 'application/json') | ||
.type('form') | ||
.end((err, res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
it( | ||
'Should successfully upvote a recipe by an authenticated user', | ||
(done) => { | ||
request.post(`${recipesApi}/${recipe[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'template literal syntax' is only available in ES6 (use 'esversion: 6').
); | ||
it( | ||
'Should successfully upvote a recipe by an authenticated user', | ||
(done) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
.set('Connection', 'keep alive') | ||
.set('Content-Type', 'application/json') | ||
.type('form') | ||
.end((err, res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
expect(res.status).to.equal(201); | ||
expect(res.body.message).to.equal('User has no favorites.'); | ||
done(); | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
Unrecoverable syntax error. (73% scanned).
.set('Connection', 'keep alive') | ||
.set('Content-Type', 'application/json') | ||
.type('form') | ||
.end((err, res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
}); | ||
it('Should return an empty array of favorites for a logged in user without a favorite', (done) => { | ||
const testUser = { ...users[2] }; | ||
request.get(`${favoriteApi}/${testUser.id}/favorites?token=${testUser.tokens[0].token}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'template literal syntax' is only available in ES6 (use 'esversion: 6').
}); | ||
}); | ||
it('Should return an empty array of favorites for a logged in user without a favorite', (done) => { | ||
const testUser = { ...users[2] }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Expected '}' to match '{' from line 75 and instead saw '...'.
Missing semicolon.
Expected an assignment or function call and instead saw an expression.
Expected ')' and instead saw ';'.
done(); | ||
}); | ||
}); | ||
it('Should return an empty array of favorites for a logged in user without a favorite', (done) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
.set('Connection', 'keep alive') | ||
.set('Content-Type', 'application/json') | ||
.type('form') | ||
.end((err, res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'Should successfuly favorite a recipe by an authenticated user', | ||
(done) => { | ||
const testUser = { ...users[1] }; | ||
request.post(`${recipesApi}/${recipe[0].id}/favorites?token=${testUser.tokens[0].token}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'template literal syntax' is only available in ES6 (use 'esversion: 6').
it( | ||
'Should successfuly favorite a recipe by an authenticated user', | ||
(done) => { | ||
const testUser = { ...users[1] }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Expected '}' to match '{' from line 46 and instead saw '...'.
Missing semicolon.
Expected an assignment or function call and instead saw an expression.
Expected ')' and instead saw ';'.
}); | ||
it( | ||
'Should successfuly favorite a recipe by an authenticated user', | ||
(done) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
.set('Connection', 'keep alive') | ||
.set('Content-Type', 'application/json') | ||
.type('form') | ||
.end((err, res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
What does this PR do?
Setup app for final deployment on heroku
Description of tasks to be completed?
How should this be manually tested?
Visit the application on heroku here