Skip to content

Commit 97bf4bf

Browse files
committed
add some tests
1 parent c11d2ec commit 97bf4bf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/client/lib/cluster/index.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('Cluster', () => {
2323
}, GLOBAL.CLUSTERS.OPEN);
2424

2525
testUtils.testWithCluster('connect should throw if already connected', async cluster => {
26-
assert.rejects(cluster.connect());
26+
await assert.rejects(cluster.connect());
2727
}, GLOBAL.CLUSTERS.OPEN);
2828

2929
testUtils.testWithCluster('multi', async cluster => {
@@ -165,6 +165,10 @@ describe('Cluster', () => {
165165
}
166166
});
167167

168+
testUtils.testWithCluster('should throw CROSSSLOT error', async cluster => {
169+
await assert.rejects(cluster.mGet(['a', 'b']));
170+
}, GLOBAL.CLUSTERS.OPEN);
171+
168172
describe('minimizeConnections', () => {
169173
testUtils.testWithCluster('false', async cluster => {
170174
for (const master of cluster.masters) {

0 commit comments

Comments
 (0)