フリー問題

Salesforce Certified JavaScript Developer のフリー問題 9 / 20 問目

問題文

A team writes guidance for designing units that are easy to verify. Which two pieces of guidance are sound? (Select two.)

選択肢

  1. Keep decisions in functions that take their inputs as arguments and return their results, with side effects pushed to the edges.
  2. Prefer many private helper methods, because a unit with more private members exposes a smaller surface and is therefore easier to verify from the outside.
  3. Expose the seams where external facilities are used, so a test can supply substitutes without replacing global state.
  4. Use inheritance to share behavior between units, because a base class provides a single place to verify the shared logic and the subclasses therefore need no tests of their own.
  5. Read configuration directly from the module scope inside each function, because a single source of truth removes the need to pass the values around.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。