Closed samsiegart closed 1 year ago
We can see from https://github.com/Agoric/ui-kit/actions/runs/5864651371/job/15900068743?pr=28 that the test now requires ses because of the dependencies on casting and notifiers. After adding ses to the test environment, I now get the below error. Maybe it's possible to migrate these tests to Ava, but vitest is not cooperating for some reason in this context.
yarn run v1.22.19
$ vitest
DEV v0.32.0 /home/samsiegart/ui-kit/packages/web-components
FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
1: 0xb6e500 node::Abort() [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
2: 0xa7e53e node::FatalError(char const*, char const*) [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
3: 0xd47c3a v8::Utils::ReportApiFailure(char const*, char const*) [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
4: 0xb70575 [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
5: 0xb7093e node::errors::TryCatchScope::~TryCatchScope() [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
6: 0xb70ec8 node::errors::TriggerUncaughtException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>, bool) [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Vitest caught 1 unhandled error during the test run.
This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.
7: 0xb71540 node::errors::PerIsolateMessageListener(v8::Local<v8::Message>, v8::Local<v8::Value>) [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
8: 0xeb3610 v8::internal::MessageHandler::ReportMessageNoExceptions(v8::internal::Isolate*, v8::internal::MessageLocation const*, v8::internal::Handle<v8::internal::Object>, v8::Local<v8::Value>) [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
9: 0xeb3821 v8::internal::MessageHandler::ReportMessage(v8::internal::Isolate*, v8::internal::MessageLocation const*, v8::internal::Handle<v8::internal::JSMessageObject>) [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
TypeError: Cannot assign to read only property 'random' of object '[object Math]'
❯ process.emit node:events:525:35
10: 0xea2661 v8::internal::Isolate::ReportPendingMessages() [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
11: 0xe88858 [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
Test Files no tests
Tests no tests
Errors 1 error
12: 0xe8962f v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
Start at 00:43:31
Duration 268ms (transform 31ms, setup 0ms, collect 0ms, tests 0ms, environment 0ms, prepare 0ms)
13: 0xd63c63 v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
14: 0xaacd6f node::InternalCallbackScope::Close() [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
FAIL Tests failed. Watching for file changes...
press h to show help, press q to quit
15: 0xaacde1 node::InternalCallbackScope::~InternalCallbackScope() [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
16: 0xb734f7 node::fs::FileHandle::CloseReq::Resolve() [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
17: 0xb758c4 [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
18: 0xb6b000 node::MakeLibuvRequestCallback<uv_fs_s, void (*)(uv_fs_s*)>::Wrapper(uv_fs_s*) [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
19: 0x16482ad [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
20: 0x164ca86 [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
21: 0x165f1c4 [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
22: 0x164d3d8 uv_run [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
23: 0xaad9e5 node::SpinEventLoop(node::Environment*) [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
24: 0xc35e0f node::worker::Worker::Run() [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
25: 0xc363c8 [/home/samsiegart/.nvm/versions/node/v18.12.1/bin/node]
26: 0x7f3ba0f3fb43 [/lib/x86_64-linux-gnu/libc.so.6]
27: 0x7f3ba0fd1a00 [/lib/x86_64-linux-gnu/libc.so.6]
Aborted
error Command failed with exit code 134.
vitest is not cooperating for some reason in this context
https://github.com/vitest-dev/vitest/pull/3527 has the fix. Released in 0.32.3. This repo is on 0.32.0.
fixes https://github.com/Agoric/ui-kit/issues/29
Tested with https://github.com/Agoric/dapp-inter/pull/195
I'd like to follow up with documentation/code examples in the README for reading vstorage, reading users' purse balances, and making offers.