Code Monkey home page Code Monkey logo

ass's People

Contributors

dannycoates avatar espadrine avatar jrgm avatar lloyd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ass's Issues

file selection

We need a very flexible and ergonomic way for the client to specify which files are to be instrumented and reported on.

Support node -p

ass is designed to work on a child process. However, it doesn't support node -p.

For instance, the following change on line 14 of the current example:

kid = cp.spawn("node", ["-p", "require('ass');require('./server')"], { stdio: 'inherit' });

yields the following error:

/example/node_modules/ass/node_modules/blanket/src/index.js:203
        args[1].indexOf(join('node_modules','mocha','bin')) > -1 &&
                ^
TypeError: Cannot call method 'indexOf' of undefined
  …
  at Object.<anonymous> (/example/node_modules/ass/index.js:119:3)

This may be an upstream bug in Blanket.

Instrumentation of main

when we fork a process running under a controlling blanket process, we need a robust but seamless way of instrumenting the initial file. see example/server.js. This server is forked, but server.js itself is not instrumented.

ENOENT in second call to ass.report

Hi lloyd,

I was trying to generate two reports: HTML and JSON, the second one always fail with the following error:

fs.js:427
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory '/home/luis/tmp/ass-coverage-data11409-8460-11mpjwe/8462.json'
    at Object.fs.openSync (fs.js:427:18)
    at Object.fs.readFileSync (fs.js:284:15)
    at /home/luis/noboxout/class/node_modules/ass/index.js:83:34
    at Array.forEach (native)
    at /home/luis/noboxout/class/node_modules/ass/index.js:81:69
    at Object.oncomplete (fs.js:107:15)

I suspect that after ass.report those file are deleted and see two possible approaches (if I'm right), listen SIGTERM and remove those files, or a new API to generate multiple outputs.

PoC

git clone https://github.com/llafuente/class.git
cd class
npm install
vi test/run.js
# search "ass error" and uncomment those 3 lines
npm run-script coverage

Thanks for this module!

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.