Giter Site home page Giter Site logo

9-3's Introduction

How to run my test scenario

  • run npm init to initiate new project
  • add file intro.js that contains test function sum
  • add export at intro.js file using module.export ={sum}
  • run npm i jest to install Jest,new folder node_models should be created (do not forget to exclude this folder in gitignore file before commit)
  • created new file with name (test or spec) which contains test case for sum function
  • import function sum in created file using 'require' for this
  • use global function test (). Second parameter callBack function
  • use expect () to specify expectetion from your test function with different matchers (toBe and etc)
  • run npm test to check your tests

What been cover in this test

  • Покрытие функций: сколько объявленных функций было вызвано.
  • Покрытие операторов: какая доля содержащихся в программе операторов была выполнена.
  • Покрытие веток: сколько выполнено веток контрольной структуры (например, операторов if).
  • Покрытие условий: какая доля логических подвыражений была протестирована на истинные и ложные значения.
  • Покрытие строк: сколько строк исходного кода протестировано.
  • У меня 100% покрытие ---

9-3's People

Contributors

avyalova avatar

Watchers

 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.