Open Michael-F-Bryan opened 3 years ago
Steps to reproduce:
$ cd bindings/web/
$ yarn test
yarn run v1.22.5
$ jest
PASS dist/Shape.test.js
Finished dev [unoptimized + debuginfo] target(s) in 0.36s
Running `target/debug/rune build /home/michael/Documents/hotg-ai/rune/examples/noop/Runefile.yml --quiet`
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
The promise rejected with the reason "ReferenceError: self is not defined".] {
code: 'ERR_UNHANDLED_REJECTION'
}
Note the "ReferenceError: self is not defined"
bit.
I've created a ticket for this upstream: https://github.com/tensorflow/tfjs/issues/5532.
We currently can't use the web bindings out of the browser because the
tfjs-tflite
package uses browser-specific APIs (e.g.self
andBlob
).It'd be really nice if we could run unit tests for our web bindings in CI without needing to start up a browser.