Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
fly & ava
Search
Pine Mizune
December 08, 2015
Programming
670
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
fly & ava
Meguro.es #1 in Drecom の発表資料です。
http://meguroes.connpass.com/event/21510/
Pine Mizune
December 08, 2015
More Decks by Pine Mizune
See All by Pine Mizune
多言語対応と絵文字ジェネレーター / i18n of Emoji Generator
pine
0
880
C++ 製グラフィックライブラリ Skia の紹介 / Introduction to the graphics library Skia written by C++
pine
0
2k
asyncio + aiohttp で作るウェブサービス / How to develop a web service with asyncio and aiohttp
pine
0
690
Lerna による明示的疎結合アーキテクチャ
pine
1
680
CircleCI 2.0 x JavaScript
pine
3
570
Perl 卒業式
pine
0
370
Android Studio の気になる warnings を抑制する方法まとめ
pine
0
520
Emoji Generator meets Browser Extensions
pine
1
3k
近年の OSS 開発における CI 選択のベストプラクティス
pine
3
4.5k
Other Decks in Programming
See All in Programming
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
350k
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
370
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
270
Creating Composable Callables in Contemporary C++
rollbear
0
170
技術的負債解消で開発者の未来を開く- AIの力でコード刷新
kmd2kmd
0
120
ふつうのFeature Flag実践入門
irof
8
4.2k
A2UI という光を覗いてみる
satohjohn
1
160
Oxlintのカスタムルールの現況
syumai
6
1.2k
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
600
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.3k
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
0
170
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
200
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Code Reviewing Like a Champion
maltzj
528
40k
GitHub's CSS Performance
jonrohan
1033
470k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
610
Paper Plane
katiecoart
PRO
1
52k
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
310
Faster Mobile Websites
deanohume
310
32k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
360
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
400
Transcript
fly & ava Pine Mizune 8 Dec, 2015 / Meguro.es
#1
自己紹介 o ID / HN: @pine613 o 好きな言語: JavaScript /
Crystal o 仕事で書いてる: Perl / Swift / Kotlin o Mobile Factory, Inc o 最寄り: 五反田駅
目次 • fly とは ? • ava とは ? •
ava + Promise • ava + Generator • ava + Async • ava + fly
• ES6 ベースの次世代ビルドシステム • 今回は詳しく説明しません – Gotanda.js #1 の発表資料参照 fly
とは ? 作者: bucaran
• ES6/7 ベースのテストランナー • Promise, Generator, Async との相性 • Babel,
co, power-assert のビルトインサポート ava とは ? 作者: sindresorhus
ava でのテストの書き方 import test from ‘ava’ test(‘testFunc’, t => {
t.is(testFunc(result), 10) })
mocha + Callback var expect = require(‘chai’).expect; it(‘testFunc’, function (done)
{ testFunc(function (result) { expect(result).to.equal(10); done(); }); });
ava + Callback import test from ‘ava’ test.cb(‘testFunc’, t =>
{ testFunc(result => { t.is(result, 10) t.end() }) })
mocha + Promise var expect = require(‘chai’).expect; it(‘testFunc’, function (done)
{ testFunc().then(function (result) { expect(result).to.equal(10); done(); }); });
ava + Promise import test from ‘ava’ test(‘testFunc’, t =>
{ return testFunc().then(result => { t.is(result, 10) }) }) Promise をそのまま返せる!
ava + co import test from ‘ava’ test(‘testFunc’, t =>
{ return co(function *() { const result = yield testFunc() t.is(result, 10) }) })
ava + Generator import test from ‘ava’ test(‘testFunc’, function *()
{ const result = yield testFunc() t.is(result, 10) }) Generator をそのまま返せる!
ava + Async import test from ‘ava’ test(‘testFunc’, async t
=> { const result = await testFunc() t.is(result, 10) }) async / await 対応
ava + fly export function* test() { this.source(‘./test/**/*.js’).ava() } $
npm install fly fly-ava ava $ fly test flyfile.js
告知: Gotanda.js #2 開催決定!! ü Gotanda.js #2 〜JS新年会〜 ü 日時:
2016 年 1 月 8 日 (金) ü 会場: 株式会社ガイアックス ü 内容: LT 祭!! (5min LT x 8) Ø 申し込みは Connpass から! http://gotandajs.connpass.com/event/22162/