Giter Site home page Giter Site logo

codewars's Introduction

Codewars and Leetcode

Little practice exercises for rainy afternoons when I get rusty Use the scrap file and the start script, but transfer to src when an exercise is finished and include a test

mochachai

Examples demonstrating mocha unit testing and chai assertions

A lot is from Jesse Warden's very useful playlist here https://www.youtube.com/playlist?list=PLZEZPz6HkCZk30XEdl0eGNhwvoR-XoWHS

For integration / server testing / async await testing, see Jesse's project here: https://github.com/JesterXL/rest-api-integration-test-example

For that project, I used nyc rather than istanbul (it's related) and this is how I did the coverage in the package.json. There are two test files testing index.js but I didn't want either of those covered by the coverage so they're in the exclude for nyc. The coverage html file is created in a coverage folder below project root

"scripts": {
    "test": "mocha index.test.js",
    "integration": "mocha index.integrationtest.js",
    "start": "node index.js",
    "coverage": "nyc --reporter=html --reporter=text mocha index.*test.js || true --timeout=3000"
  },
  "nyc": {
    "exclude": [
      "*test.js",
      "build"
    ]
  },```

codewars's People

Contributors

gillianbc avatar

Watchers

James Cloos avatar  avatar

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.