using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
This file contains hidden or 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
| Even or Odd | |
| O(1) * O(1) * O(1) = O(1) //Correct | |
| Are you here? | |
| O(N) * O(1) * O(N) * O(1) * O(1) O(1) = O(N^2) //Correct | |
| Doubler | |
| O(N) * O(1) * O(1) = O(N) //Correct | |
| Naive Search |
This file contains hidden or 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
| • As a user, I should be able to shuffle through beers by clicking the shuffle button. | |
| • As a user, I should be able to like the current beer selected and add it to a "Liked" column | |
| • As a user, I should be able to un-like the current beer selected and add it to a "Un-Liked" column |
This file contains hidden or 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
| Alex | |
| • Remove Transparent background from container | |
| • Align buttons | |
| • Align item prices | |
| • Align grocery items | |
| • Total Price should be centered | |
| • Make logo black and white | |
| • Remove border radius from buttons | |
| • Item string should be validated by length | |
| • Item price should be validated by length of number as well |
This file contains hidden or 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
| 1) Screen for adding groceries to list | |
| 2) Screen for removing groceries from list | |
| 3) Screen for updating grocers on list | |
| Adding Groceries | |
| • User enter grocery item into query with price and click submit >> Grocery item is added to list | |
| • User doesn't enter anything into query and presses submit >> Error pops up on top of grocery list | |
| Removing Groceries | |
| • User clicks delete button next to grocery item >> The item adjacent to the delete button is removed from the list |
This file contains hidden or 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
| • As a user, I should be able to create a grocery list. | |
| • As a user, I should be able to add groceries to the grocery list. | |
| • As a user, I should be able to remove groceries from the grocery list. | |
| • As a user, I should be able to update groceries on the grocery list. | |
| • As a user, I should be able to input a price with each grocery item. | |
| • As a user, I should be able to see the the grand total from all of my groceries added up. |
This file contains hidden or 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
| db.restaurants.find() | |
| // -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ | |
| db.restaurants.find().sort({name: 1}).limit(10); | |
| // -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ | |
| var objectId = ObjectId('58b4f03574f6f324485f40ed') | |
| db.restaurants.findOne({_id: objectId}) |
using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
This file contains hidden or 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
| 'use strict'; | |
| // Solution to Mad Libs drill | |
| // ========================== | |
| const express = require('express'); | |
| const bodyParser = require('body-parser'); | |
| const app = express(); |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| <style> | |
| * { | |
| box-sizing: border-box | |
| } |
NewerOlder