Git Product home page Git Product logo

tddbc_js_jest's Introduction

TDDBC for JavaScript + Jest with Node.js

これは、TDDBCのNode.js + Jest 向けプロジェクトです。

Documentation

セットアップ&テスト

$ git clone https://github.com/tddbc/javascript-jest.git
$ cd javascript-jest
$ npm install
$ npm test

> [email protected] pretest /Users/dictav/golang/src/github.com/dictav/javascript-jest
> npm run fmt && npm run lint

> [email protected] fmt /Users/dictav/golang/src/github.com/dictav/javascript-jest
> prettier --write *js *.json lib/*js

jest_js.config.js 53ms
jest_mjs.config.js 7ms
main.js 8ms
main.mjs 7ms
prettier.config.js 4ms
package-lock.json 355ms
package.json 30ms
lib/sample.js 11ms
lib/sample.mjs 7ms
lib/sample_test.js 11ms
lib/sample_test.mjs 7ms

> [email protected] lint /Users/dictav/golang/src/github.com/dictav/javascript-jest
> eslint main.js main.mjs lib/*js

> [email protected] test /Users/dictav/golang/src/github.com/dictav/javascript-jest
> npm run test:js && npm run test:mjs

> [email protected] test:js /Users/dictav/golang/src/github.com/dictav/javascript-jest
> jest --config jest_js.config.js

 PASS  lib/sample_test.js
  ✓ exported class (2ms)
  ✓ private function (2ms)

Test Suites: 1 passed, 1 total
Tests:       2 passed, 2 total
Snapshots:   0 total
Time:        1.154s, estimated 2s
Ran all test suites.

コマンド

コマンド 内容
npm test lint とテストをまとめて行います
npm run test:js CommonJS の実装のテストを行います
npm run test:mjs ES Module の実装のテストを行います
npm run fmt コードの整形を行います
npm run lint コードの静的検証を行います
npm run watch:js ファイル変更を監視し、変更があったらテストを自動で行います
npm run watch:mjs ファイル変更を監視し、変更があったらテストを自動で行います

License

Copyright (c) 2019 TDD BaseCamp and other contributors

http://devtesting.jp/tddbc/

https://github.com/tddbc

Licensed under the MIT license.

tddbc_js_jest's People

Contributors

dictav avatar dependabot[bot] avatar cl-kazumi-nakajima avatar grimrose avatar sue445 avatar kazweda avatar twada avatar azusa avatar kuniwak avatar nnasaki 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.