-
Open your project (if you're using WebPack, obviously)
-
npm install sinon --save-dev
-
You should now have Sinon in your node modules and listed in your
package.json
file -
In your tests, require Sinon:
var sinon = require('sinon');
Use this gist to write down notes and questions as you read through the lesson plan. https://github.com/turingschool/lesson_plans/blob/master/ruby_04-apis_and_scalability/react_in_theory.markdown
It is a small view rendering library that works in components.
- Find a Repo that is primarily written in a language you're comfortable with.
- Check out 24pullrequests.com
- Talk to mentors that regularly contribute to open source for suggestions
- Think about tools you already use like rspec or minitest.
- Browse around Github
- Avoid 'dead' repos - look at open PRs for the project - if a ton unmerged, project may be dead. Also look at stars for the repo and last commit date on master.
- Look at the open issues for ones you can help with
- Look at coverage reports and builds for areas that are untested
- Fork the repo
To graduate from Module 4 you will need to get ~80% of the total assigned points and pass your portfolio review. There will be ~1250 total points.
Everyone should have access to a google drive spreadsheet that lists where you're at in the pointwise.
If you don't have a link or the magic of google drive is on the fritz and your link isn't working, give us a shout.
I understand that functions in JavaScript can take any number of arguments.
I can describe the similarity between blocks in Ruby and anonymous functions in JavaScript.
Where are the methods available to all arrays (e.g. forEach
, map
, etc.) defined?
I can explain the difference between using a for
loop and the forEach
method.
I can explain the difference between function declarations and function expressions.
I can explain what the value of this
is in a normal function.
I can explain what the value of this
is when called from the context of an object.
I can explain how to explicitly set the value of this
in a function.
I can explain the difference between call
and apply
.
I can explain how the new
keyword changes the way a function behaves.
I can explain the implicit steps that happen in my function when I use the new
keyword.
I can explain the difference between an object's prototype and the prototype
property on the constructor function.
I understand how to place method on a prototype.
I understand the difference between using Object.create
and using a
**Step One**: Watch [Sorting Algorithms in JavaScript](https://www.youtube.com/watch?v=uRyqlhjXYQI) | |
**Step Two**: Fork this gist. | |
**Step Three**: Respond to this question in your fork: "What are some of the balances and trade offs between different sorting algoritms?" | |
**Step Four**: _Totally Optional_: take a look at some of the other forks and comment if the spirit moves you. |
When you start working with WebPack for GameTime, you'll notice that you can't just define a variable in one file and find it in another as easily as you can in Rails.
Read Node.js, Require and Exports and Organize Your Code with RequireJS
- In the context of Node, what is a
module
? - The code examples from the second blog post look very different from the first. Why?