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
3
630
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
750
C++ 製グラフィックライブラリ Skia の紹介 / Introduction to the graphics library Skia written by C++
pine
0
1.6k
asyncio + aiohttp で作るウェブサービス / How to develop a web service with asyncio and aiohttp
pine
0
640
Lerna による明示的疎結合アーキテクチャ
pine
1
620
CircleCI 2.0 x JavaScript
pine
3
530
Perl 卒業式
pine
0
320
Android Studio の気になる warnings を抑制する方法まとめ
pine
0
480
Emoji Generator meets Browser Extensions
pine
1
2.9k
近年の OSS 開発における CI 選択のベストプラクティス
pine
3
4.5k
Other Decks in Programming
See All in Programming
Datadog DBMでなにができる? JDDUG Meetup#7
nealle
0
160
⚪⚪の⚪⚪をSwiftUIで再現す る
u503
0
120
JAWS Days 2025のインフラ
komakichi
1
330
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
160
Rails 1.0 のコードで学ぶ find_by* と method_missing の仕組み / Learn how find_by_* and method_missing work in Rails 1.0 code
maimux2x
1
260
クリーンアーキテクチャから見る依存の向きの大切さ
shimabox
5
1.1k
kintone開発を効率化するためにチームで試した施策とその結果を大放出!
oguemon
0
330
Serverless Rust: Your Low-Risk Entry Point to Rust in Production (and the benefits are huge)
lmammino
1
160
Visual StudioのGitHub Copilotでいろいろやってみる
tomokusaba
1
220
技術を改善し続ける
gumioji
0
180
iOSでQRコード生成奮闘記
ktcryomm
2
130
ML.NETで始める機械学習
ymd65536
0
240
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
11
1.3k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
KATA
mclloyd
29
14k
Faster Mobile Websites
deanohume
306
31k
Adopting Sorbet at Scale
ufuk
75
9.2k
Site-Speed That Sticks
csswizardry
4
420
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
260
Build your cross-platform service in a week with App Engine
jlugia
229
18k
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/