×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

Jasmine.js Multiple-Choice Questions (MCQs)

Jasmine is an open-source testing framework for JavaScript. It aims to run on any JavaScript-enabled platform, to not intrude on the application nor the IDE, and to have easy-to-read syntax. It is heavily influenced by other unit testing frameworks, such as ScrewUnit, JSSpec, JSpec, and RSpec. Wikipedia

Jasmine.js MCQs: This section contains multiple-choice questions and answers on the various topics of Jasmine.js. Practice these MCQs to test and enhance your skills on Jasmine.js.

List of Jasmine.js MCQs

1. What is Jasmine.js?

  1. JavaScript testing framework
  2. JavaScript mobile development framework
  3. JavaScript web development framework

Answer: A) JavaScript testing framework

Explanation:

Jasmine.js is a JavaScript testing framework.

Discuss this Question


2. Is Jasmine.js open-source?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, Jasmine.js is an open-source framework.

Discuss this Question


3. Does Jasmine.js requires DOM?

  1. Yes
  2. No

Answer: B) No

Explanation:

Jasmine.js does not require any DOM.

Discuss this Question


4. Which architecture does Jasmine.js follows?

  1. MVM
  2. BDD
  3. MVVM
  4. MVP

Answer: B) BDD

Explanation:

Behaviour-driven development architecture does Jasmine.js follows.

Discuss this Question


5. A ____ is a set of related type test cases developed for a given file or function.

  1. Groups
  2. Cluster
  3. Suite
  4. Collection

Answer: C) Suite

Explanation:

A suite is a set of related type test cases developed for a given file or function.

Discuss this Question


6. Which of the following method is used to define suites?

  1. Define
  2. Suits
  3. Test
  4. Describe

Answer: D) Describe

Explanation:

Describe method is used to define suites.

Discuss this Question


7. How many arguments does Describe function take?

  1. 2
  2. 3
  3. 4
  4. 5

Answer: A) 2

Explanation:

Describe function takes two arguments: a text that describes the collection of tests, and a function that includes the tests.

Discuss this Question


8. The ____ block is a single test defined with its method.

  1. Nested Suites block
  2. Describe Block
  3. IT block
  4. Expect block

Answer: C) IT block

Explanation:

The "it" block is a single test defined by its method.

Discuss this Question


9. ____ is also known as a matcher.

  1. Nested Suites block
  2. Describe Block
  3. IT block
  4. Expect block

Answer: D) Expect block

Explanation:

Expect block is also known as a matcher.

Discuss this Question


10. Mainly how many types of matchers does Jasmine provides?

  1. 5
  2. 4
  3. 3
  4. 2

Answer: D) 2

Explanation:

2 types of matchers Jasmine provides: Inbuilt and user-defined.

Discuss this Question


11. Which of the following is an inbuilt matcher?

  1. toBe
  2. toEqual
  3. toBeNull
  4. All of the above

Answer: D) All of the above

Explanation:

Following are the inbuilt matchers:

  • toBe
  • toEqual
  • toBeNull

Discuss this Question


12. User-defined matcher needs to be defined ____.

  1. Implicitly
  2. Explicitly
  3. Both

Answer: B) Explicitly

Explanation:

Custom matcher needs to be defined explicitly().

Discuss this Question


13. Which of the following inbuilt matcher just compares if the outcome of the operation sent as an argument to this method matches or not?

  1. Equal ()
  2. toMatch ()
  3. toEqual ()

Answer: C) toEqual ()

Explanation:

toEqual () just compares if the outcome of the operation sent as an argument to this method matches or not.

Discuss this Question


14. Which of the following inbuilt matcher is used to determine whether a value does not match the output of any function?

  1. NotEqual ()
  2. nottoMatch ()
  3. toEqual ()
  4. Not.toEqual()

Answer: D) Not.toEqual()

Explanation:

Not.toEqual () is used to determine whether a value does not match the output of any function.

Discuss this Question


15. In Jasmine, which of the following Boolean matcher is used to determine if the result is true or false?

  1. toBeTruthy()
  2. toTruthy():
  3. CheckTruthy():

Answer: A) toBeTruthy()

Explanation:

toBeTruthy() Boolean matcher is used to determine if the result is true or false.

Discuss this Question


16. Among toBe () and toEqual () which of the following compares objects recursively and checks property equality, and it is type sensitive.

  1. toBe ()
  2. toEqual ()

Answer: B) toEqual ()

Explanation:

toEqual () compares objects recursively and checks property equality, and it is type sensitive.

Discuss this Question


17. ____ matchers allow us to determine whether an element belongs to the same array or another sequential object.

  1. Tocheck ()
  2. toMatch()
  3. toContain()

Answer: C) toContain()

Explanation:

toContain() matchers allow us to determine whether an element belongs to the same array or another sequential object.

Discuss this Question


18. Suppose you want to Check to see whether any variables in the code are predefined, then which of the following matcher you will use?

  1. TobePredefined ()
  2. toBeDefined
  3. ToPredefined()

Answer: B) toBeDefined

Explanation:

toBeDefined () Check to see whether any variables in the code are predefined.

Discuss this Question


19. ____ matcher helps to check null values?

  1. ToNull()
  2. Null()
  3. toBeNull()

Answer: C) toBeNull()

Explanation:

toBeNull () matcher helps to check null values.

Discuss this Question


20. When we are unsure about the output, we employ the special matcher named as ____.

  1. Any
  2. All
  3. Some
  4. None

Answer: A) Any

Explanation:

When we are unsure about the output, we employ the special matcher any.

Discuss this Question


21. How many Spying technologies are available in Jasmine?

  1. 5
  2. 4
  3. 3
  4. 2

Answer: D) 2

Explanation:

There are two types of spying technology available in Jasmine: SpyOn() and CreateSpy().

Discuss this Question


22. ____ is a feature integrated into the Jasmine framework that allows you to spy on a specific section of code.

  1. SpyOn()
  2. Spy ()
  3. CreateSpy ()

Answer: A) SpyOn()

Explanation:

SpyOn() is a feature integrated into the Jasmine framework that allows you to spy on a specific section of code.

Discuss this Question


23. Which of the following command manages the Jasmine Clock, which may be used to regulate the flow of time in your tests?

  1. Clock ()
  2. toBeClock ()
  3. Jasmine.Clock()

Answer: C) Jasmine.Clock()

Explanation:

Jasmine.Clock () command manages the Jasmine Clock, which may be used to regulate the flow of time in your tests.

Discuss this Question


24. ____ check to see whether any variables were previously undefined.

  1. toBeNotDefined ()
  2. toUndefined()
  3. toBeUndefined ()

Answer: C) toBeUndefined ()

Explanation:

toBeUndefined () check to see whether any variables were previously undefined.

Discuss this Question


25. When jasmine.js was released?

  1. 2001
  2. 2019
  3. 2010
  4. 2000

Answer: C) 2010

Explanation:

In 2010 jasmine.js was released.

Discuss this Question


26. It() is global function or a Local function?

  1. Global
  2. Local

Answer: A) Global

Explanation:

it() function is a global function.

Discuss this Question


27. Which of the following companies uses Jasmine?

  1. Accenture.
  2. Walmart.
  3. E-Commerce.
  4. GitLab.
  5. All of the above

Answer: E) All of the above

Explanation:

Following companies use Jasmine:

  • Accenture.
  • Walmart.
  • E-Commerce.
  • GitLab.

Discuss this Question


28. Is toBeTruthy () and toBeFalsy the same?

  1. Yes
  2. No

Answer: B) No

Explanation:

toBeFalsy matches the output to be false whereas toBeTruthy matches the output to be true.

Discuss this Question


29. After each test specification has been executed, ____ method is invoked

  1. Each ()
  2. AfterEach ()
  3. EachAfter()

Answer: B) AfterEach ()

Explanation:

After each test specification has been executed, afterEach() method is invoked.

Discuss this Question


30. Which of the following are the alternative to Jasmine.js?

  1. Mocha
  2. Jest
  3. Tape
  4. All of the above

Answer: D) All of the above

Explanation:

Following are the alternatives of Jasmine.js:

  • Mocha
  • Jest
  • Tape

Discuss this Question




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.