Testing with Mocha – Kevin Wang – Medium

Testing with Mocha  #tdd #react #mocha #javascript #reactjs

  • js file and running “npm test” in the console.var assert = function() { describe(‘#indexOf()’, function() { it(‘should return -1 when the value is not present’, function() { assert.equal(-1, [1,2,3].
  • indexOf(4)); }); });});The test should pass and you should see the below.From the example above though, the function that the test is testing for is written in the same file.
  • toFixed(2) }, sleepApneaIncrease: function(amount){ return (amount * 1.06).
  • toFixed(2) }, heartDiseaseIncrease: function(amount){ return (amount * 1.17).
  • toFixed(2) }, checkCondition: function(amount, condition){ switch (condition) { case “Allergies”: return case “Sleep Apnea”: return case “Heart Disease”: return default: return 0; } }}I store them all in an object so thatI am able to export out and require them when I need to.

My first experience with Mocha is at Flatiron. When we were doing Javascript labs/work we used Mocha to test out the code that we wrote, it made sure that the results are as we expected. This was my…
Continue reading “Testing with Mocha – Kevin Wang – Medium”

JavaScript Frameworks: Learn React JS – Brandon Morelli – Medium

  • Stephen Grider has created two courses for learning React — A beginners course and an advanced course.
  • This is great because you can try the first course and see if you like React.
  • If you’re unaware, Redux is a state manager that helps you manage ‘state’ within your React applications.
  • That’s why you take Stephen’s course.
  • Redux: reducers, actions, and the state tree.Another ‘learn by building’ course, you’ll walk away with production ready web applications.

According to the 2016 Stack Overflow Survey, React is in the top ten for developer salaries and it’s the #1 fastest growing technology. That means more jobs and more opportunities for you — There’s…
Continue reading “JavaScript Frameworks: Learn React JS – Brandon Morelli – Medium”

Phoenix ReactJS (Tempe, AZ)

Mark your calendar Phoenix! The Phoenix ReactJS is @GoDaddy August 10 - details:

  • Start a Meetup Group Start a Meetup Group
  • Generic Pre-requisite: React is a new technology.
  • I recommend that you have previously built something real in React, whether professional or your own pet…
  • By creating a Meetup account, you agree to the Terms of Service
  • Join us and be the first to know when new Meetups are scheduled

Read the full article, click here.


@williamu: “Mark your calendar Phoenix! The Phoenix ReactJS is @GoDaddy August 10 – details:”


This is the Phoenix community of javascript developers coding with ReactJS.


Phoenix ReactJS (Tempe, AZ)

Mocha compiler for es6 + react components with css require statements · GitHub

  • function noop () { return null ; } require .
  • Mocha compiler for es6 + react components with css require statements
  • extensions [ ‘ .css ‘ ] = noop; require .
  • Instead of embedding the babel compiler you could do something like this
  • // Allow the stage to be configured by an environment

Read the full article, click here.


@fisherstwitt: “Using #mochajs with #ES6 #reactjs components and #css import statements ending up with “Unexpected token”? Check:”


@xseignard this is a great solution! I changed your answer from css to less to suit my purposes and interestingly, I kept getting Invariant Violation errors until I switched the order of the compilers and listed jsx first. Any idea why that would be?


Mocha compiler for es6 + react components with css require statements · GitHub

Building a New React Site… (part 259)

  • with that, you need to make sure you understand what TDD is first before you can crawl and practice it.
  • Some people ask: “When is TDD relevant”.
  • Building a New React Site via Outside-in TDD (part 259)
  • So at times I’d like to share with you my experience test driving that

Read the full article, click here.


@DaveSchinkel: “wanna watch me code? Live stream recording from yesterday #reactjs #programming”


This video is about Building a New React Site via Outside-in TDD, created by dschinkel, who showed impressive coding skills in JavaScript


Building a New React Site… (part 259)

Redux like Dan Abramov — Medium

Redux like @dan_abramov:  #ReactJS

  • Once you’ve done that write an action creator .
  • Sometime when you’re doing your first action creators and reducers configure a store .
  • To go from point A to point B as fast and cleanly as possible go in a straight line.
  • Now that you have knowledge of your dependencies, I want you to know about the way to write the code.
  • Put an asterisk on mocha because it’s best that you install mocha globally.

Read the full article, click here.


@ReactiveConf: “Redux like @dan_abramov: #ReactJS”


Go farther, go further, go harder.


Redux like Dan Abramov — Medium