This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://upbeat-handball.glitch.me/ | |
https://glitch.com/edit/#!/upbeat-handball | |
https://glitch.com/edit/#!/leather-ethernet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const oneDay=1000*60*60*24; | |
const firstMondayDay = new Date("June 3, 2019"); | |
const colors = ["Red", "Orange", "Yellow", "Green", "Blue", "Purple", "Black"]; | |
function checkFirstMonday(day) { | |
if (day.getDay() != 1) { | |
throw "The first Monday is not set correctly."; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> bloccit@1.0.0 test /Users/nickchang/work/thinkful/tc/norman/bloccit | |
> export NODE_ENV=test&& jasmine | |
Started | |
server is listening for requests on port 3000 | |
................................TypeError: Cannot read property 'title' of null | |
at Post.findOne.then (/Users/nickchang/work/thinkful/tc/norman/bloccit/spec/integration/posts_spec.js:270:26) | |
at tryCatcher (/Users/nickchang/work/thinkful/tc/norman/bloccit/node_modules/bluebird/js/release/util.js:16:23) | |
at Promise._settlePromiseFromHandler (/Users/nickchang/work/thinkful/tc/norman/bloccit/node_modules/bluebird/js/release/promise.js:517:31) | |
at Promise._settlePromise (/Users/nickchang/work/thinkful/tc/norman/bloccit/node_modules/bluebird/js/release/promise.js:574:18) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nickchang@Nicks-MacBook-Pro:~/work/thinkful/tc/donovanky/bloccit$ npm test | |
> bloccit@1.0.0 test /Users/nickchang/work/thinkful/tc/donovanky/bloccit | |
> set NODE_ENV=test&& jasmine | |
Started | |
server is listening for requests on port 3000 | |
...sequelize deprecated Model.all has been deprecated, please use Model.findAll instead node_modules/sequelize/lib/model.js:4228:9 | |
F.Internal Server Error. Redirecting to /topic/new | |
Fsequelize deprecated Model.findById has been deprecated, please use Model.findByPk instead node_modules/sequelize/lib/model.js:4208:9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import Total from './Total'; | |
const USCurrencyFormat = new Intl.NumberFormat('en-US', { | |
style: 'currency', | |
currency: 'USD' | |
}); | |
class Cart extends Component { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function nbYear(p0, percent, aug, P) { | |
// your code | |
var numYears = 0; | |
var currentPop = p0; | |
var convertPercent; | |
if (percent === null || percent == 0) { | |
convertPercent = 0; | |
} else { | |
convertPercent = percent * .01; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Method 1: Using `bind()` method / Constructor bind | |
class Toggle extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = {isToggleOn: true}; | |
// This binding is necessary to make `this` work in the callback | |
this.handleClick = this.handleClick.bind(this); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Watch Usage | |
› Press a to run all tests. | |
› Press f to run only failed tests. | |
› Press q to quit watch mode. | |
› Press p to filter by a filename regex pattern. | |
› Press t to filter by a test name regex pattern. | |
› Press Enter to trigger a test run. | |
PASS src/App.test.js | |
FAIL src/SearchBar/SearchBar.test.js | |
● SearchBar Component › triggers onChange event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import SearchForm from './SearchForm/SearchForm'; | |
import DisplayList from './DisplayList/DisplayList'; | |
import './App.css'; | |
const searchURL = 'https://www.googleapis.com/books/v1/volumes' | |
function formatQueryParams(params) { | |
const queryItems = Object.keys(params) | |
.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const request = require("request"); | |
const server = require("../../src/server"); | |
const base = "http://localhost:3000/advertisements/"; | |
describe("routes : advertisements", () => { | |
describe("GET /advertisements", () => { | |
it("should return a status code 200", done => { | |
request.get(base, (err, res, body) => { | |
expect(res.statusCode).toBe(200); | |
done(); |
OlderNewer