Suppose you're opening an issue and there's a lot noisey logs that may be useful.
Rather than wrecking readability, wrap it in a <details>
tag!
<details>
Summary Goes Here
npm install [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] --save-dev |
This guide assumes you have the emmet
and language-babel
packages already installed in Atom
keymap.cson
file by clicking on Atom -> Keymap…
in the menu bar'atom-text-editor[data-grammar~="jsx"]:not([mini])':
npm shrinkwrap
is useful, but maddening (once it's in place and you want to update a package).
Say you've got a package.json
with module ember-cli
as a devDependency
currently at version 1.13.1
. And you have an npm-shrinkwrap.json
file too, generated with the --dev
flag.
If you change the version of ember-cli
to, say, 1.13.8
in package.json
and run npm install
, nothing will happen.
If you do that and manually change references in the shrinkwrap file, you will still have trouble (as nested dependencies may now be incorrect).
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
/* CSS */ | |
/** | |
* This code is licensed under the terms of the MIT license | |
* | |
* Deep diff between two object, using lodash | |
* @param {Object} object Object compared | |
* @param {Object} base Object to compare with | |
* @return {Object} Return a new object who represent the diff | |
*/ | |
function difference(object, base) { | |
function changes(object, base) { |
If you encounter the following:
GitHub rate limit reached. To increase the limit use GitHub authentication.
Run jspm endpoint config github to set this up.
Sources :
title | slug | createdAt | language | preview |
---|---|---|---|---|
Unit testing Angular.js app with node.js, mocha, angular-mocks and jsdom |
unit-testing-angular-js-app-with-node |
2015-07-05T18:04:33Z |
en |
Majority of search result about unit testing Angular.js apps is about how to do it by using test frameworks that run the tests in a real browser. Even though it's great to be able to test your code in multiple platforms, in my opinion it creates a lot of boilerplate code and makes it hard to run the tests in, for instance a CI-server. |
Lean unit tests with minimal setup
module.exports = function(duration) { | |
return function(){ | |
return new Promise(function(resolve, reject){ | |
setTimeout(function(){ | |
resolve(); | |
}, duration) | |
}); | |
}; | |
}; |