Skip to content

Commit

Permalink
DA-455: Remove Refdoc from Txn Idx Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ejscribner committed Jun 5, 2024
1 parent 439f553 commit 78422b7
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions __test__/transaction-indexes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ test('Testing indexes', async () => {
});

UserSchema.index.findN1qlByName = { by: 'name', options: { limit: 4, select: 'name' } };
UserSchema.index.findRefName = { by: 'name', type: 'refdoc' };

const User = model('TransactionUser7', UserSchema);
const ottoman = getDefaultInstance();
Expand All @@ -34,20 +33,11 @@ test('Testing indexes', async () => {

const usersN1ql = await User.findN1qlByName(userData.name, { transactionContext: ctx });
expect(usersN1ql.rows[0].name).toBe(userData.name);

// Unable to use refdoc index function, seems ctx.get doesn't work with plain text document
// await delay(2500);
//
// const userRefdoc = await User.findRefName(userData.name, { transactionContext: ctx });
// expect(userRefdoc.name).toBe(userData.name);
});
} catch (e) {
console.log(e);
}

const usersN1ql = await User.findN1qlByName(userData.name, { consistency: SearchConsistency.LOCAL });
expect(usersN1ql.rows[0].name).toBe(userData.name);

const userRefdoc = await User.findRefName(userData.name);
expect(userRefdoc.name).toBe(userData.name);
});

0 comments on commit 78422b7

Please sign in to comment.