Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
fly & ava
Pine Mizune
December 08, 2015
Programming
3
520
fly & ava
Meguro.es #1 in Drecom の発表資料です。
http://meguroes.connpass.com/event/21510/
Pine Mizune
December 08, 2015
Tweet
Share
More Decks by Pine Mizune
See All by Pine Mizune
多言語対応と絵文字ジェネレーター / i18n of Emoji Generator
pine
0
380
C++ 製グラフィックライブラリ Skia の紹介 / Introduction to the graphics library Skia written by C++
pine
0
820
asyncio + aiohttp で作るウェブサービス / How to develop a web service with asyncio and aiohttp
pine
0
420
Lerna による明示的疎結合アーキテクチャ
pine
1
520
CircleCI 2.0 x JavaScript
pine
3
460
Perl 卒業式
pine
0
270
Android Studio の気になる warnings を抑制する方法まとめ
pine
0
380
Emoji Generator meets Browser Extensions
pine
1
2.7k
近年の OSS 開発における CI 選択のベストプラクティス
pine
3
4.4k
Other Decks in Programming
See All in Programming
TechFeed Conference 2022 - Kotlin Experimental
jmatsu
0
840
Groovy Roadmap
paulk
7
13k
LOWYAの信頼性向上とNew Relic
kazumax55
4
370
Named Document って何?
harunakano
0
500
「新卒だけ」じゃない!学び直しを支えるミクシィの技術研修を紹介
mixi_engineers
PRO
0
150
TextPruner による大規模言語モデルの軽量化 / Large language model pruning using TextPruner
misawann
0
320
Becoming an Android Librarian
skydoves
3
470
Enterprise Angular: Frontend Moduliths with Nx and Standalone Components @jax2022
manfredsteyer
PRO
0
310
クリエイティブ系のウェブサイト制作で役立つCSS技法 / CSS for develop creative website
clockmaker
2
1.7k
もしも、 上司に鬼退治を命じられたら~プロジェクト計画編~
higuuu
0
290
読みやすいコードを書こう
yutorin
0
430
[RailsConf 2022] The pitfalls of realtime-ification
palkan
0
240
Featured
See All Featured
Side Projects
sachag
449
37k
The Invisible Side of Design
smashingmag
289
48k
Code Reviewing Like a Champion
maltzj
506
37k
How to Ace a Technical Interview
jacobian
265
21k
What the flash - Photography Introduction
edds
61
10k
WebSockets: Embracing the real-time Web
robhawkes
57
5k
Imperfection Machines: The Place of Print at Facebook
scottboms
253
11k
Designing for Performance
lara
596
63k
Fontdeck: Realign not Redesign
paulrobertlloyd
73
4.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
12
890
Designing with Data
zakiwarfel
91
3.9k
Building Adaptive Systems
keathley
25
1.1k
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/