I wonder if i tweet here. each jot could be a new file that is clicked with the word next to it. just thinking out loud here.

========


4/16

window is not in node.

Node does not have access to the window. Thus, state is then managed by vuex. I knew I was going to eventually run into this again but I figured out a way (somehow) to avoid that by keeping files to run in the window.

========

Sinon.js

## spies
var func = sinon.spy()
sinon.spy() gives us a fake function to track execution.

// arrange
var res = {
  render: sinon.spy()
}

// act
authcontroller.getIndex(res)

// assert
res.render.calledOnce.should.be.true
res.render.firstCall.args[0].should.equal('index')

Sinon api
methods like 'calledOnce' are part of the sinon.
- calledOnce
- firstCall

 _dw lesson learned
 var request = {
   headers: {
     user_token: 'vtsk7vjDeur4dayam1Mt7ja2'
   }
 };
 
 return API.get(request).then(function(response) {
    console.log(response.data);
 });

 _dw Gotchas 1. imported {} instaed of List

 _dw Gotchas 2. tried using @vue/test-utils but couldn't get it to work so went back to avoiraz

 _dw Gotchas 3. was not using chai should.

  _dw Gotchas 4. I was trying to test the created hook after it had been created. But if I import a list, then spy on it's methods, THEN shallow it. We will see it is called with Data.


================

10 hour projects
- getting a project setup for the first time is challenging.
- the first feature is challenging
- getting the test suite setup for the new project is challenging
- practicing these pieces and the repitition of getting tests setup is a good use of time

here are some 10 hour projects I want to do;
- express/node on AWS

RAILS:
- mailers / mailing list
- background jobs
- webpacker vue
- webpaccker stimulus
- stimulus w/out webpacker
- active storage
- action cable
- TDD app
- API + VUE jam