You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
次のようなテストコードを書きます。(これはMochaを使っていますが大体どんなテストフレームワークでも同じことが出来ます。) 次のスナップショットでは、transformというJSONを入力に受け取り、JSONを出力する関数をテストしています。 snapshot-test.js: const fs = require("fs"); const path = require("path"); const assert = require("assert"); const fixturesDir = path.join(__dirname, "snapshots"); // transform function const transform = require("../transform"); describe("Snapshot testing", () => { fs.readdirSy
MDN browser compatibility data: Taking the guesswork out of web compatibility Building the web is hard The most powerful aspect of the web is also what makes it so challenging to build for: its universality. When you create a website, you’re writing code that needs to be understood by a plethora of browsers on different devices and operating systems. It’s difficult. To make the web evolve in a san
So testing, right? We should do it. The thing is, testing is hard, and good testing is reaaaaaaally hard, and tbh I’m pretty bad at testing. So I end up not testing my apps, and then I feel guilty about it, but I’ll stop you now: you can’t run guilt on Travis. If this sounds familiar, then this blog post is for you. I did a little song-and-dance that sets up Puppeteer* , takes screenshots of your
Observable’s reactive JavaScript notebooks are uniquely suited for interactive data visualization, animation, learning, and experimentation. Plot.plot({ padding: 0, color: { pivot: d3.mean(seattle, d => d.temp_max), legend: true, scheme: "BuRd" }, y: {tickFormat: Plot.formatMonth("en", "short")}, marks: [ Plot.cell(seattle, Plot.group({fill: "max"}, { x: (d) => d.date.getUTCDate(), y: (d) => d.dat
Creator of Ruby on Rails, Founder & CTO at Basecamp (formerly 37signals), NYT Best-selling author of REWORK and REMOTE, and Le Mans class-winning racing driver. Modern JavaScript doesn’t have to mean single-page, client-side MVC apps.Stimulus 1.0: A modest JavaScript framework for the HTML you already haveWe write a lot of JavaScript at Basecamp, but we don’t use it to create “JavaScript applicati
エラーの種類 コードに誤りがある場合、一般的に以下の 2 つのうち、どちらかの誤りであることがよくあります。 構文エラー: コードの記述ミスで、実際にプログラムがすべて実行されなかったり、途中で動作が止まってしまったりします。通常、エラーメッセージもいくつか提示されます。正しいツールに慣れ、エラーメッセージが意味していることを理解している限り、これらは通常修正しても問題ありません。 論理エラー: 書き方は正しくても、コードが意図した通りに動ないエラーです。つまりプログラムは動くのですが、間違った結果を返します。たいていの場合に、問題となる箇所に直接のエラーメッセージが出ることがないため、構文エラーよりも直すのが難しいことが多いです。 まあ、こんなに単純ではありません。もっと深く追及していくと違う種類のエラーも出てくることでしょう。しかし、見習いのうちは上の分類で十分です。上記の 2 つの種
Top 10 JavaScript errors from 1000+ projects (and how to avoid them) Jan 24, 2018 To give back to our community of developers, we looked at our database of thousands of projects and found the top 10 errors in JavaScript. We’re going to show you what causes them and how to prevent them from happening. If you avoid these "gotchas," it'll make you a better developer. Because data is king, we collecte
The changes of proposal’s status @ 62nd meeting of Ecma TC39 New Proposals Proposal Stage
JavaScriptは、「Don't break the web」ということを念頭に、仕様拡張なども構成されていっているのですが、時として妙なものも発生してしまいます。 falsyな値 JavaScriptにはfalsyな値が7つ(0、-0、NaN、false、null、undefined、'')ある、ということは有名かと思います。…で、MDNを見てみると、8つ目の値が存在します。それが、document.allです。 仕様としての挙動 通常のJavaScriptにfalsyとなるオブジェクトは存在しませんから、明らかに目立つ挙動なのですが、WHATWGの仕様を参照してみると、さらにすごい挙動をするとのことでした。 typeof document.all === 'undefined' document.all == null、document.all == undefined(===では
The State of JavaScript Frameworks, 2017 Laurie Voss, co-founder and COO, npm, Inc. January 3rd, 2018 Part 3: Back-End Frameworks The story on the back end is simple: Express is the overwhelmingly dominant solution for back end services written in JavaScript. The next four biggest frameworks are so small relative to Express that it’s hard to even see them. The other clear pattern here is that Expr
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く