@virtru/nanotdf
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-beta.17 • Public • Published

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 build

Testing

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 test

To run the browser functional tests:

npm i
npm run build
open ./tests/browser-tests/index.html

Adding tests

Node tests:

  • Keep unit tests along side the scripts /src/**/<scriptName>.test.ts
  • Keep functional tests within /tests and give it a meaningful name

Browser tests:

  • Keep functional tests within /tests/browser-tests and give it a meaningful name
  • Add helpers to /tests/browser-tests/helpers.js
  • Add fixtures to /tests/browser-tests/fixtures.js as const fixtures_myNewFixture = {};
  • Add test to the /tests/browser-tests/index.html within the test comments boundary

Readme

Keywords

none

Package Sidebar

Install

npm i @virtru/nanotdf

Weekly Downloads

1

Version

0.0.1-beta.17

License

MIT

Unpacked Size

267 kB

Total Files

79

Last publish

Collaborators

  • oveprev
  • ry-virtru
  • dricaud
  • virtru-admin
  • jrschumacher
  • pflynn-virtru
  • the_krakatoa