-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(a3p): add new test case for vStorage readFully method
rel: #10574
- Loading branch information
1 parent
1dd4589
commit 063d01e
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* global fetch */ | ||
|
||
import test from 'ava'; | ||
import { makeVStorage } from '@agoric/client-utils'; | ||
import { networkConfig } from './test-lib/index.js'; | ||
|
||
test('readFully should vstorage node history', async t => { | ||
const vstorage = makeVStorage({ fetch }, networkConfig); | ||
const { readLatest, readAt, readFully } = vstorage; | ||
|
||
// this test was executed with different nodes and the same behavior was observed | ||
const nodePath = 'published.committees.Economic_Committee.latestQuestion'; | ||
|
||
console.log('readLatest: ', await readLatest(nodePath)); | ||
console.log('readLatest: ', await readAt(nodePath)); | ||
|
||
// Return a rejected promise | ||
console.log('readLatest: ', await readFully(nodePath)); | ||
|
||
t.pass(); | ||
}); |