Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lasso-node

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lasso-node

JavaScript widget and page unit testing with on the fly instrumentation

  • 0.1.13
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

lasso

JavaScript widget and page unit testing with on the fly instrumentation

NPM info

Build status dependencies devDependencies endorse

installation

npm install -g lasso-node

Install phantomjs (version 1.8 or higher is recommended), it should be in the path.

30 second example

  1. Open examples\basic\foo.html in a browser. It should load foo.js, fooTests.js but report no coverage.

  2. From command line run lasso on foo.html

    lasso-node foo.html

Lasso starts a local webserver, starts phantomjs, runs the foo.html through the phantomjs. When phantomjs is asking for a .js file, lasso loads the js, instruments using istanbul and serves the instrumented version. Thus javascript code coverage is computed absolutely transparently to the testing code. After phantomjs is done, it saved the coverage object into a json file. Node then creates several reports: console and html. The html reports are very detailed, please take a look at them inside folder cover.

Options

Use -h or --help command line switch to see all available options

Main ones:

  • --jsunity - filters a few jsunity library js files to avoid instrumenting 3rd party tools
  • --serve - start the webserver and wait, you can then open http://localhost:8888/foo.html in any browser to see what phantomjs is running.

Contact

Please contact me, Gleb Bahmutov at gleb.bahmutov@gmail.com with any comments, questions or suggestions.

License

MIT license, see included file. You can do pretty much anything except claim code ownership or sue me if there are problems ;)

Keywords

FAQs

Package last updated on 30 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc