Skip to content

Commit

Permalink
test: augment collections test to exercise clear/has/re-init
Browse files Browse the repository at this point in the history
This was broken because of #8756 . The modified tests are marked as
failing, until the fix is landed.
  • Loading branch information
warner committed Aug 30, 2024
1 parent c045163 commit ef3b045
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions packages/swingset-liveslots/test/collections.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ function exerciseMapOperations(t, collectionName, testStore) {
`key "[Alleged: something missing]" not found in collection "${collectionName}"`,
),
);
if (collectionName === 'map') {
// strong map, so we can .clear
testStore.clear();
for (const [key, _value] of stuff) {
t.false(testStore.has(key));
}
fillBasicMapStore(testStore);
}
}

function exerciseSetOperations(t, collectionName, testStore) {
Expand Down Expand Up @@ -172,9 +180,17 @@ function exerciseSetOperations(t, collectionName, testStore) {
`key "[Alleged: something missing]" not found in collection "${collectionName}"`,
),
);
if (collectionName === 'set') {
// strong set, so we can .clear
testStore.clear();
for (const [key, _value] of stuff) {
t.false(testStore.has(key));
}
fillBasicSetStore(testStore);
}
}

test('basic map operations', t => {
test.failing('basic map operations', t => {
exerciseMapOperations(
t,
'map',
Expand All @@ -190,7 +206,7 @@ test('basic weak map operations', t => {
);
});

test('basic set operations', t => {
test.failing('basic set operations', t => {
exerciseSetOperations(
t,
'set',
Expand Down

0 comments on commit ef3b045

Please sign in to comment.