LoginSignup
0
0

More than 1 year has passed since last update.

expectation構文

Posted at

アウトプット

expectation(エクスペクテーション)とは、
テスト検証で得られた挙動が想定通りなのかを確認する構文。
雛形の基本構造は下記の通り

expect(検証で得られた実際の挙動).to matcher(想定した挙動)

学んだこと

単体テストコード・結合テストコードや、
検証する機能の種類によって、
expectの引数や、matcherの種類が変わる。
たが今まで使用したものは、基本構造を応用したものであった。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0