Giter Club home page Giter Club logo

mocha-tutorial's Introduction

Mocha 시작하기

Mocha 설치

Mocha를 설치하기 위해서는 먼저 Node.js와 npm이 설치되어 있어야 합니다. 본문에는 Node.js와 npm 설치 방법을 제외하고 시작하도록 하겠습니다. Node.js와 npm을 설치하였다면 적당한 프로젝트 폴더를 생성합니다. 여기서는 Mocha_test라고 하겠습니다.

$ C:\Mocha_test

생성된 경로에 npm 명령어를 통해 package.json을 생성합니다.

$ npm init

이제 package.json이 생성되었으니 본격적으로 mocha를 설치하겠습니다. mocha를 설치 할 때에는 -g 옵션을 붙혀서 global하게 설치해도 됩니다.

$ npm install mocha --save-dev 또는 npm i -g mocha

--save-dev 옵션을 주었기에 package.jsondevDependencies에서 mocha가 추가되어 있는 것을 볼 수 있습니다. mocha가 정상적으로 설치가 되어 있는지 확인하기 위해서는 다음과 같이 실행합니다.

$ mocha --version 또는 mocha -V

mocha와 관련된 옵션은 mocha -h를 통해 확인 할 수 있습니다. 이제 mocha 설치까지 끝났으니 본격적으로 mocha를 사용할 때입니다. 아래에 단계별로 예제를 업로드하였습니다. 아래 예제를 통해서 각 단계별로 mocha의 사용법을 익힐 수 있습니다.


Mocha Tutorial

mocha-tutorial's People

Contributors

kdydesign 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.