Coder Social home page Coder Social logo

test-bloomon's Introduction

Test bloomon

This is the status of the test after around 4 hours The program works. You can use docker or local to run it, see doc below.

I start from a structure and tools I always use in my projects (eslint, prettier, jest), so its just a copy/paste of the structure and base commands.

You can find in the code some tests I use to build the program (see yarn tdd) But the code is not fully tested. Specialy I didn't have the time to do a feature test of the whole program (a shame because with jest and snapshot testing, It will be easy to use the sample and compare the output)

Its also the first time I used readline interface, so I did something very simple and I'm not using all the power of streams. I used only pure function in this program to simplify it and of course the datalayer is completely in memory/in a module (don't do that in prod). Also all the particular cases (empty string, wrong rule, etc ...) are not tested.

In term of librairies, I use common one (commander, lodash) and jest for test (my preference compare to chai, karma, etc ....)

Also the program is not using async function, because we have only one stream and one thread to read it, parallelisation is not required or will change nothing.

If you try to execute a lint (eslint) on the code, there are some bad practice I use for simplifying this test (param reassign, ...)

If you have any questions, please open issues.

Requirements

Docker execution

  • docker
  • docker-compose

Local version

  • nvm or
  • nodejs carbon lts

and yarn

Run it

Docker version

docker-compose up

Run the program directly with the example.stream file in input, modify the docker-compose.yml if you want to execute something else.

Local version

yarn start  

Will run the program with example.stream

If you want to execute another stream file :

node ./src/index.js <filePathOfInputStream>

Test

yarn test:unit

test-bloomon's People

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.