Question 126

A test has a dependency on database. query. During the test, the dependency is replaced with an object called database with the method, Calculator query, that returns an array. The developer does not need to verify how many times the method has been called.
Which two test approaches describe the requirement?
Choose 2 answers
  • Question 127

    A developer wrote a fizzbuzz function that when passed in a number, returns the
    following:
    ● 'Fizz' if the number is divisible by 3.
    ● 'Buzz' if the number is divisible by 5.
    ● 'Fizzbuzz' if the number is divisible by both 3 and 5.
    ● Empty string if the number is divisible by neither 3 or 5.
    Which two test cases will properly test scenarios for the fizzbuzz function?
    Choose 2 answers
  • Question 128

    Refer to following code:
    class Vehicle {
    constructor(plate) {
    This.plate =plate;
    }
    }
    Class Truck extends Vehicle {
    constructor(plate, weight) {
    //Missing code
    This.weight = weight;
    }
    displayWeight() {
    console.log('The truck ${this.plate} has a weight of ${this.weight} lb.');}} Let myTruck = new Truck('123AB', 5000); myTruck.displayWeight(); Which statement should be added to line 09 for the code to display 'The truck 123AB has a weight of 5000lb.'?
  • Question 129

    Refer to the code below:

    Line 05 causes an error.
    What are the values of greeting and salutation once code completes?
  • Question 130

    developer has a web server running with Node.js. The command to start the web
    server is node server,js. The web server started having latency issues. Instead of a one second
    turn around for web requests, the developer now sees a five second turnaround,
    Which command can the web developer run to see what the module is doing during the
    latency period?