Code Monkey home page Code Monkey logo

devleague--behavior-driven-shopping-list's People

Watchers

 avatar  avatar

devleague--behavior-driven-shopping-list's Issues

fix the `npm test` script

  "scripts": {
    "test": "echo 'run http-server or live-server then open http://localhost:8080/tests.html to run tests!'"
  },

NOTICE: possible unexpected test running behavior

this is a note that i want @edsperanto and @Chaz-C to be aware of

while the tests here https://github.com/edsperanto/devleague--behavior-driven-shopping-list/blob/master/js/shopping_list_item_test.js#L28-L38 will run as expected,
do note that these it() blocks may run asynchronously (in parallel).
so while the order of these tests do not matter because of the contents of these blocks (check, and uncheck).
be aware that you should not trust that one test will happen after the other.
in order to maintain confidence when testing in isolation, utilize mocha's beforeEach() hook, so that you can be certain that each it() block is running using a predictable test object (myItem).

to close this task, use beforeEach() to instantiate a new myItem instance each time

"hard" assert ShoppingListItem .render()

using dynamic values here could be problematic. what if myItem.is_done is null instead of the expected true or false values.
the render() method would return <li class='completed_null' ... and the tests will still pass, while this is not actually the desired behavior.

you should expect the li class to be 'completed_false'

(if it says anything except 'completed_false' make this spec fail)

at line : https://github.com/edsperanto/devleague--behavior-driven-shopping-list/blob/master/js/shopping_list_item_test.js#L42

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.