Skip to content

Commit

Permalink
fix: test passStyleOf copyMap and iters
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Jan 9, 2022
1 parent 9af71ab commit 2286e0c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/store/test/test-copyMap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// @ts-check

import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';
import { getTag, passStyleOf } from '@agoric/marshal';
import { getCopyMapEntries, makeCopyMap } from '../src/keys/copyMap.js';
import '../src/types.js';

test('copyMap - iters are passable', t => {
const m = makeCopyMap([
['x', 8],
['y', 7],
]);
t.is(passStyleOf(m), 'tagged');
t.is(getTag(m), 'copyMap');
const i = getCopyMapEntries(m);
t.is(passStyleOf(i), 'remotable');
const iter = i[Symbol.iterator]();
t.is(passStyleOf(iter), 'remotable');
});

0 comments on commit 2286e0c

Please sign in to comment.