onnxruntime/js/common
Yulong Wang 53c771f215
[js/common] add unit tests for onnxruntime-common (#16812)
### Description
"onnxruntime-common" starts to get more and more complicated, so it's a
good idea to add unit tests for it.

Includes the following changes:
- move `mocha` from each subfolder (js/web/, js/node/) to root (js/), so
that it will be installed once and all subfolder can use.
- add folder `test` in js/common/ as root folder for ort-common tests.
- add sub folder `type-tests`. this folder contains a few typescript
source code, which are excluded from the tsconfig.json. they are not
compiled by default. instead, file `type-tests.ts` calls typescript
compiler (tsc) to check for the files under this folder whether the
compilation result is as expected. If tsc compiles a file successfully
when a failure is expected, this is considered an failed test.
- add sub folder `unit-tests`. files under this folder will be compiled
by default. we use default mode of mocha (using `describe()` and `it()`)
to setup test groups and cases.
- update eslint rules accordingly.
2023-07-25 14:37:41 -07:00
..
lib [js/common] allow creating (u)int64 tensors in 2 ways (#16541) 2023-07-11 21:07:36 -07:00
test [js/common] add unit tests for onnxruntime-common (#16812) 2023-07-25 14:37:41 -07:00
.gitignore [js/common] add unit tests for onnxruntime-common (#16812) 2023-07-25 14:37:41 -07:00
.npmignore [js/common] allow import onnxruntime-common as ESM and CJS (#15772) 2023-06-12 12:05:11 -07:00
build.js [js/common] allow import onnxruntime-common as ESM and CJS (#15772) 2023-06-12 12:05:11 -07:00
package-lock.json Update VERSION_NUMBER (#15773) 2023-05-03 15:07:34 -07:00
package.json [js/common] add unit tests for onnxruntime-common (#16812) 2023-07-25 14:37:41 -07:00
README.md Replace 'master' branch ref to 'main' in the code (#12547) 2022-08-22 10:48:12 -07:00
tsconfig.json [js/common] allow import onnxruntime-common as ESM and CJS (#15772) 2023-06-12 12:05:11 -07:00
typedoc.json [js/api] add typedoc and revise comments (#9077) 2021-09-20 17:54:46 -07:00
webpack.config.js [js/common] allow import onnxruntime-common as ESM and CJS (#15772) 2023-06-12 12:05:11 -07:00

ONNX Runtime JavaScript API

ONNX Runtime JavaScript API is a unified API for all JavaScript usages. It's dependency of the following NPM packages:

  • onnxruntime-node
  • onnxruntime-web
  • onnxruntime-react-native

This package (onnxruntime-common) is not designed for using directly. Please consider to install one of the NPM packages above according to target platform.

License

License information can be found here.