Git Product home page Git Product logo

fewpjs-js-fundamentals-variables-lab's Issues

Second bullet point in section 'Working Through the Problems'

The second bullet point is describing the test it relates to incorrectly.
The bullet says this:
In the next it function call, we are still describing companyName. This time, it says it raises error if the companyName is changed. The next line of code tests this. It's ok if some of the code in that line is confusing. Just know that the code attempts to change companyName to a different value, and that this reassignment should throw an error. So you need to make sure that you are using the correct type of variable declaration such that attempting to reassign the variable throws an error.

The test it is describing doesn't exist. This is the test in its place:
it('is defined as a const', function () {
expect(js).to.match(/const companyName/, "Expected companyName to be a const"); });

The bullet needs to be changed to reflect this test.

Test broken

the code

const companyName = 'Scuber'

does not pass the test case

companyName 1) raises error if the companyName is changed

even though it should...

Tests Fail Under Correct, Succeed Under Incorrect Circumstances

The tests currently try to test for companyName being a const, and the other two variables being lets. It fails at all three instances.

Behavior:
For the following code:

const companyName = "Scuber";
const mostProfitableNeighborhood = "Chelsea";
const companyCeo = "Susan Smith";

All tests pass except the one checking if companyName is a const, which fails due to the use of an undeclared variable in the test (ReferenceError: js is not defined).

Expected:
Later tests checking for let declaration should fail by raising typeError. First test should pass by raising typeError.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.