Jasmine JavaScript Testing Framework

FREE Jasmine JavaScript Knowledge Questions and Answers

0%

Which Jasmine function is used to indicate that a test specification is pending?

Correct! Wrong!

Using the 'pending()' function in Jasmine, you can indicate that a test specification is pending.

What is a "fixture" in Jasmine?

Correct! Wrong!

During testing, a fixture is a sample input or set of data.

Which Jasmine function is employed in a test specification to simulate asynchronous operations?

Correct! Wrong!

The "done()" function in Jasmine can be used to manage asynchronous actions.

How does Jasmine test exceptions?

Correct! Wrong!

The 'toThrowError()' matcher in Jasmine can be used to test exceptions.

What does Jasmine's "beforeEach()" function do?

Correct! Wrong!

A common test environment is created by running code before each test specification in a suite using the "beforeEach()" function.

Which matcher does Jasmine employ to determine whether two values are equal?

Correct! Wrong!

To determine whether two values are equal, use the matcher 'toEqual()'.

What does Jasmine's "matcher" mean?

Correct! Wrong!

In a test, a matcher function in Jasmine compares the actual and expected values.

Which Jasmine method does your test specification's assertion use?

Correct! Wrong!

To make assertions, utilize Jasmine's expect() function.

Which Jasmine function is used to specify a test specification?

Correct! Wrong!

In Jasmine, a test specification is defined using the 'it()' function.

What does Jasmine's spyOn() function accomplish?

Correct! Wrong!

To set up a spy that records function calls and their arguments, use the'spyOn()' method.

Which Jasmine function is used to specify a test suite?

Correct! Wrong!

To define a test suite with Jasmine, use the "describe()" function.