background preloader

JS

Facebook Twitter

Tester du code avec Karma + (Jasmine ou Mocha) Bon, ça va faire 20 ans (en octobre 2014) que les tests unitaires sont un concept publique, il va peut-être falloir s'y mettre.

Tester du code avec Karma + (Jasmine ou Mocha)

Non ? Alors, on va tester efficacement avec Karma et Jasmine ou Mocha, au choix. Karma Tutorial - Unit Testing JavaScript. A quick start guide to testing client side code using Karma.

Karma Tutorial - Unit Testing JavaScript

Technologies Web pour développeurs. Le Web fournit d'incroyables opportunités aux développeuses et développeurs. Pour tirer le meilleur parti de ces technologies, il est nécessaire de savoir comment les utiliser. Voici différents liens qui vous permettront de naviguer dans la documentation de ces technologies web. Documentation pour le développement web Références Une liste de l'ensemble des références sur les technologies web dont celles sur HTML, CSS, etc. AngularJS épisode 1 : démarrage d'un projet angular.js. Tutoriel AngularJS. Conclusion et perspectives. GitHub - getify/You-Dont-Know-JS: A book series on JavaScript. @YDKJS on twitter. Component Communication - ts. Spelling dictionaries — TeXnicCenter 2.0 documentation. Additional dictionaries TeXnicCenter is distributed with English, German and French dictionaries.

Spelling dictionaries — TeXnicCenter 2.0 documentation

Dictionaries for several other languages are provided by the OpenOffice.org project. Installing dictionaries TeXnicCenter uses the Hunspell spell checker whose dictionaries consist of two files: an affix and a dictionary file. La programmation fonctionnelle en JS. NodeSchool. Ericelliott/react-pure-component-starter. Dev-Mind/angular2-devmind. Ericelliott/react-pure-component-starter. Dev-Mind/angular2-devmind. Tape. Tap-producing test harness for node and browsers $ node example/timing.js TAP version 13 # timing test ok 1 should be equal not ok 2 should be equal operator: equal expected: 100 actual: 107 # tests 2 # pass 1 # fail 1 You always need to require('tape') in test files.

tape

Tape's arguments are passed to the glob module. My node test strategy. Historically testing has been far far down on my list of priorities.

My node test strategy

However that's been slowly changing over the last 3-4 years, and now I have a fairly solid and systematic method to testing. I'm writing it partly to capture it in time as I know it'll continue to evolve and partly to share with you to get your input too. Always be automating It nearly goes without saying that the whole process should be automated. I'm not a big tooling fan, so I don't personally have something like grunt constantly running my tests. However, all my projects these days will immediately be added to Travis (my CI of choice) and typically with email alerts turned on.

JS Bin, sadly, has nearly no tests, which means the main process is: can I sign in? Prerequisites I have a few prerequisites for my test strategy: Runs either from an event (like a commit or repo push) or from the CLI. Documentationjs. Javascript quiz. ES6 edition. ← back 946 words 4 November 2015 Remember that crazy Javascript quiz from 6 years ago?

Javascript quiz. ES6 edition.

Craving to solve another set of mind-bending snippets no sensible developer would ever use in their code? Looking for a new installment of the most ridiculous Javascript interview questions? Look no further! The "ECMAScript Two Thousand Fifteen" installment of good old Javascript Quiz is finally here. The rules are as usual: Assuming ECMA-262 6th Edition Implementation quirks do not count (assuming standard behavior only) Every snippet is run as a global code (not in eval, function, or module contexts) There are no other variables declared (and host environment is not extended with anything beyond what's defined in a spec) Answer should correspond to exact return value of entire expression/statement (or last line) "Error" in answer indicates that overall snippet results in a compile or runtime error Cheating with Babel doesn't count (and there could even be bugs!)

Ready? Here be quiz result. Auchenberg/volkswagen. 12 Rules for Professional JavaScript in 2015. JavaScript is hard.

12 Rules for Professional JavaScript in 2015

It moves so fast that it’s often unclear whether you’re “doing it wrong” at any given moment. Understanding JavaScript Constructors. The following is a guest post by Faraz Kelhini.

Understanding JavaScript Constructors

Some of this stuff is out of my comfort zone, so I asked Kyle Simpson to tech check it for me. Kyle's answer (which we did during an Office Hours session) was very interesting. It was: 1) This article is technically sound. JavaScript doesn't really have classes in a traditional sense and this is the way most people shoehorn them in. 2) We may want to stop shoehorning them in. JavaScript has objects and we can use them in the way they are intended to do the same kinds of things. Having a good understanding of constructors is crucial to truly understand the JavaScript language.

A constructor is useful when you want to create multiple similar objects with the same properties and methods. Function Book() { // unfinished code } var myBook = new Book(); The last line of the code creates an instance of Book and assigns it to a variable; even though the Book constructor doesn't do anything, myBook is still an instance of it. Conclusion Share On. 12 Rules for Professional JavaScript in 2015. Coodict/javascript-in-one-pic. Js in one pic.png (PNG Image, 2882 × 6709 pixels) - Scaled (14%)

Js in one pic.png (PNG Image, 2882 × 6709 pixels) - Scaled (14%) Making a Game API Server Using Node.js: Revisited. A few years ago, Brett Lawson made a great blog series on creating a game server using Node.js and Couchbase Server.

Making a Game API Server Using Node.js: Revisited

Since then, the Node.js SDK for Couchbase has grown significantly from version 1.x to 2.x. In this article we're going to revisit those original three posts and change them to keep up with the latest Node.js and Express Framework standards as well as the latest Node.js SDK version of Couchbase. The Prerequisites.