
エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
jestでパラメータ化テストをする - Qiita
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
jestでパラメータ化テストをする - Qiita
module.exports = () => { const hours = new Date().getHours(); return ((6 < hours) && (hours <= 18... module.exports = () => { const hours = new Date().getHours(); return ((6 < hours) && (hours <= 18)); } const isDaytime = require('./isDaytime'); beforeEach(() => { jest.clearAllMocks(); }); const OriginalDate = Date; // 退避 test.each([ [0, false], [5, false], [6, false], [7, true], [17, true], [18, true], [19, false], ])('%i時のとき、%pを返す', (hours, expected) => { jest.spyOn(global, 'Date').mockImplemen