describe(description, specDefinitions)
Create a group of specs (often called a suite).
Calls to describe
can be nested within other calls to compose your suite as a tree.
Parameters:
Name | Type | Description |
---|---|---|
description | String | Textual description of the group |
specDefinitions | function | Function for Jasmine to invoke that will define inner suites and specs |
expect(actual) → {matchers}
Create an expectation for a spec.
Parameters:
Name | Type | Description |
---|---|---|
actual | Object | Actual computed value to test expectations against. |
Returns:
Type
it(description, testFunctionopt, timeoutopt)
Define a single spec. A spec should contain one or more 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.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
description | String | Textual description of what this spec is checking | ||
testFunction | implementationCallback | <optional> | Function that contains the code of your test. If not provided the test will be | |
timeout | Int | <optional> | jasmine.DEFAULT_TIMEOUT_INTERVAL | Custom timeout for an async spec. |
See:
spyOn(obj, methodName) → {Spy}
Install a spy onto an existing object.
Parameters:
Name | Type | Description |
---|---|---|
obj | Object | The object upon which to install the |
methodName | String | The name of the method to replace with a |
Returns:
Type