Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Selenium + Sinon.js
Search
Kazuhito Hokamura
January 27, 2015
Programming
0
800
Selenium + Sinon.js
http://qiita.com/hokaccha/items/9f4dc019c2ea8c6c58a3
Kazuhito Hokamura
January 27, 2015
Tweet
Share
More Decks by Kazuhito Hokamura
See All by Kazuhito Hokamura
TypeScriptとGraphQLで実現する 型安全なAPI実装 / TSKaigi 2024
hokaccha
5
4.9k
Kotlin製のGraphQLサーバーをNode.jsでモジュラモノリス化している話
hokaccha
0
3.7k
GraphQLの負債と向き合うためにやっていること
hokaccha
2
1.5k
ユビーのアーキテクチャに対する取り組み
hokaccha
1
450
RailsエンジニアのためのNext.js入門
hokaccha
7
21k
Cookpad Summer Internship 2021 Web Frontend
hokaccha
0
7.3k
巨大なモノリシック Rails アプリケーションの マイクロサービス化戦略 / 2019 microservices in cookpad
hokaccha
3
4k
巨大なRailsアプリケーションを「普通」にするための取り組み
hokaccha
1
1k
Web Frontend Improvement in Cookpad
hokaccha
1
1.1k
Other Decks in Programming
See All in Programming
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
140
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
0
190
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
4
1.3k
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
160
JETLS.jl ─ A New Language Server for Julia
abap34
2
460
Combinatorial Interview Problems with Backtracking Solutions - From Imperative Procedural Programming to Declarative Functional Programming - Part 2
philipschwarz
PRO
0
120
AIコーディングエージェント(Manus)
kondai24
0
220
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
900
Jetpack XR SDKから紐解くAndroid XR開発と技術選定のヒント / about-androidxr-and-jetpack-xr-sdk
drumath2237
1
190
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
180
tparseでgo testの出力を見やすくする
utgwkk
2
290
チームをチームにするEM
hitode909
0
400
Featured
See All Featured
Tell your own story through comics
letsgokoyo
0
770
The Cult of Friendly URLs
andyhume
79
6.7k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.8k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
120
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
17
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
520
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
Prompt Engineering for Job Search
mfonobong
0
130
Bash Introduction
62gerente
615
210k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
82
Transcript
Selenium + Sinon.js #template_literal_sushi #e2e_sushi
$('button').click(function() { navigator.geolocation.getCurrentPosition( function(res) { var lat = res.coords.latitude; var
lon = res.coords.longitude; $('#pos').text(lat + ':' + lon); }); });
// stub.js sinon.stub(navigator.geolocation, 'getCurrentPosition') .callsArgWith(0, { coords: { latitude: 10,
longitude: 20 } });
// sinon.jsͱstubͷεΫϦϓτΛ࣮ߦ driver.executeScript(fs.readFileSync('./sinon.js').toString()); driver.executeScript(fs.readFileSync('./stub.js').toString()); // ςετ࣮ߦ driver.findElement(By.css('button')).click(); driver.findElement(By.css('#pos')).getText().then(function(text) { assert(text
=== '10:20'); });
ଞʹ͜͏͍͏έʔεͰ͑Δ͔ • खͰ࠶ݱͮ͠Β͍ҟৗܥͷ࠶ݱ • APIϨεϙϯεͷmockԽ
ͨͩ͠Γ͗͢Δͱ ࢮ͵ͷͰҙ