Describe the naming for the function it()

When I first saw it(), I was wondering if the name "it" is
an abbreviation of anything. After some search, I finally
realized that the name is only a pronoun. Therefore, I
think it's worthwhile to include it in the documentation.
This commit is contained in:
John Lin
2019-12-16 12:21:59 +08:00
parent 8d53f4d202
commit 6c766b7785

View File

@@ -60,6 +60,9 @@ getJasmineRequireObj().interface = function(jasmine, env) {
* Define a single spec. A spec should contain one or more {@link expect|expectations} that test the state of the code.
*
* A spec whose expectations all succeed will be passing and a spec with any failures will fail.
* The name `it` is a pronoun for the test target, not an abbreviation of anything. It makes the
* spec more readable by connecting the function name `it` and the argument `description` as a
* complete sentence.
* @name it
* @since 1.3.0
* @function