commit | 277f82fa43db08cbfd04fa93e290a6dd4d99e2d3 | [log] [tgz] |
---|---|---|
author | Bogdan Caprita <caprita@google.com> | Fri Mar 18 12:07:32 2016 -0700 |
committer | Bogdan Caprita <caprita@google.com> | Fri Mar 18 12:07:39 2016 -0700 |
tree | b72419bd5a1e8477faaaf9e5f1622bc785bd108d | |
parent | b4d1d9da75f2e5f9dcf77feb879f3974436dad1e [diff] |
v.io: use test.V23Init instead of v23.Init in test code test.V23Init creates a context that's suitable for tests, including a test blessing and no prod mounttable root. Using test.V23Init everywhere in tests gives us a choke-point for adding test-specific configuration of the runtime and context. Change-Id: I078a614e49a4f185afa4d6c25bb3c1d5b880cd1e
This repository defines the JavaScript API for Vanadium. The client and server APIs defined here work both in Node.js and the browser.
npm install --save vanadium/js
The entry point to the API is through a module called vanadium
, everything else is considered private and should not be accessed by the users of the API.
The vanadium
module is exported as a global in the browser JavaScript library and for Browserify and Node.js the “main” property in the package.json
points to /src/vanadium
making it the index module and therefore Browserify and Node.js users can gain access to the API with:
var vanadium = require("vanadium");
One of the goals of this project is to only write the code once and have it run in both Node.js and browsers. Therefore, specific build and testing steps have been designed in the project to ensure this goal.
When run in a browser, vanadium.js
expects that the vanadium extension will be installed.
Bugs and feature requests should be filed in the Vanadium issue tracker.
GNU Make is used to build and test Vanadium.
Build everything:
make build
Test everything:
make test
Run a specific test suite:
make test-unit make test-unit-node make test-unit-browser make test-integration make test-integration-node make test-integration-browser
Remove all build and testing artifacts:
make clean