Giter Club home page Giter Club logo

kavun's People

Contributors

pinarkaymaz6 avatar sengitu avatar wolframkriesing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

pinarkaymaz6

kavun's Issues

Does travis fail if unit tests fail?

Kavun gracefully shuts down even if a unit test is broken. It reports the number of failed and succeeded tests.

For now, it neither creates a file to provide results to CI, nor returns an error exit value. Even if the tests are broken, CI will not probably fail. Oops.

Create a new branch and write a failing test to see the behaviour. Find a way to fix that if CI build does not fail.

Implement watch feature

Instead of running test each time, kavun should be able to up all the time and track the changed files. By that way, it can re-run tests in the changed files.

Running only changed files could bring complexity, the first step should be running all tests if there is a change in a file we track.

For now, in order to gain watch ability, we can suggest watch -n 2 npm run test.

Provide more detail on the error messages

Currently library is able to handle assertion errors correctly, but in case of other kind of error it returns meaningless message.

Execute.js should be able to return error and a new layer should be able to distinguish types of errors.

Create time functionalities

Create functionalities to test methods like setTimeout or setInterval. Provide an interface to keep process waiting for a while. In a project, I've used following code snippet to simulate actual wait, this functionality should be provided by kavun itself.

const waitOneSecond = () =>
  new Promise(resolve => {
    setTimeout(() => {
      resolve();
    }, 1000);
  });

spec('someSpec', () => {
  unit('someUnit', async () => {
    await waitOneSecond();
  })
})

Implement a way to cancel intervals

Right now, if there is an on-going interval, even if tests complete running, process does not returns. Either we would override interval and timeout's to keep their references, or we can stop the process after we make sure that every test has ran.

Overall suite run time problem

According to nodejs' documentation about process.hrtime, it's value alone is meaningless. We should get difference between two intervals to get an accurate meaningful solution.

process.hrtime's optional time parameter does the diff calculation, which we can remove. Also overall run time is difference of last hrtime to 0, which is meaningless according to document.

Setup a continuous integration

Make sure that every commit gets validated by running their tests.
How? There are many ways, figure out which one you like and what you need.

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.