@virtru/nanotdf
v0.0.1-beta.17
Published
## ⚠️ Warning
Readme
NanoTDF
⚠️ Warning
This library is in continual development. The current implementation of NanoTDF library is as follows, but expect issues.
- [x] Parse binary
- [x] happy paths
- [ ] sad paths
- [ ] 80% code coverage
- [ ] Decrypt nanoTDF
- [ ] Encrypt nanoTDF
- [ ] Encode binary
Build
The nanoTDF library will build two version. The difference between these version is slight, but significant.
- Node
/build - Browser
/build-browser
To build run:
npm i
npm run buildTesting
There are three significant tests:
- Node unit tests, located
/src/**/*.test.ts - Node functional tests, located
/tests/*.test.ts - Browser functional tests, located
/tests/*.test-browser.js
To run the node unit tests and functional tests:
npm i
npm run testTo run the browser functional tests:
npm i
npm run build
open ./tests/browser-tests/index.htmlAdding tests
Node tests:
- Keep unit tests along side the scripts
/src/**/<scriptName>.test.ts - Keep functional tests within
/testsand give it a meaningful name
Browser tests:
- Keep functional tests within
/tests/browser-testsand give it a meaningful name - Add helpers to
/tests/browser-tests/helpers.js - Add fixtures to
/tests/browser-tests/fixtures.jsasconst fixtures_myNewFixture = {}; - Add test to the
/tests/browser-tests/index.htmlwithin the test comments boundary
