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
Webエンジニアの森脇です。LCLでは、以前より「Capybara + PhantomJS」でE2Eテストを行っていましたが、「Puppeteer + Headless Chrome」へ変更しました。 元々は、軽くPuppeteerを触ってみるだけのつもりでしたが、できが良く本格的にE2Eテストへ導入することにしました。 本記事では、変更の経緯や、PuppeteerでE2Eテストを実装する上でのTIPSを紹介します。なお、Capybara + PhantomJSを利用したE2Eテストは、以下の記事でご紹介しております。 techblog.lclco.com 変更の経緯 PhantomJSは古めのWebkitをベースにしているため、一部のCSSがうまく適用されず、Headless Chromeへ移行を以前より考えていました。そんな中、PhantomJSの開発が終了したこともあり、移行すること
Mocking is a technique to isolate test subjects by replacing dependencies with objects that you can control and inspect. A dependency can be anything your subject depends on, but it is typically a module that the subject imports. For JavaScript, there are great mocking libraries available like testdouble and sinon, and Jest provides mocking out of the box. Recently, I joined Jest as a collaborator
Today we are excited to announce Jest 23, our largest major release to date! Together with over 100 contributors, we've shipped a ton of features and bug fixes. Thank you to everyone in the community for helping make JavaScript Testing Delightful. We would also like to welcome both Babel and webpack to the Jest community! After converting from Mocha to Jest 23 Beta, webpack saw their total test su
http://www.assertjs.com Assert(js) Testing Conference is a one-day, single-track conference with a laser focus on testing for JavaScript developers - both UI...
Intercepting HTTP requests, specifying resources accessed by bypassing a proxy server, specifying testing metadata, deprecated passing a regular promise to assertions. Request Hooks: Intercepting HTTP requests (#1341) TestCafe now allows you to record HTTP request data or mock responses. You can also create a custom HTTP request hook to emulate authentications like Kerberos or Client Certificate
These docs are from an older version of sinon. Do you want the latest docs? API documentation - Sinon.JS - v18.0.0 This page contains the entire Sinon.JS API documentation along with brief introductions to the concepts Sinon implements. General setup Fakes Spies Stubs Mocks Spy calls Promises Fake timers Fake XHR and server JSON-P Assertions Matchers Sandboxes Utils Migration guides Migrating from
High, Low, AverageWedgetail gives you accurate timings for the best, worst and average timings. Measure thousands of executionsGet accurate statistics out of the box, by setting `numberOfExecutions` to at least 5000. import test from "ava"; import { timeExecution } from "wedgetail"; test("Can time a function", async t => { // This object contains a definition of the threshold // at which your func
次のようなテストコードを書きます。(これは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
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
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く