Skip to content

Commit 693c99d

Browse files
ggazzoclaude
andcommitted
fix(tests): update errorType assertions for migrated chat endpoints
The typed endpoint pattern returns 'error-invalid-params' instead of 'invalid-params' when query/body validation fails. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 92761b2 commit 693c99d

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

  • apps/meteor/tests/end-to-end/api

apps/meteor/tests/end-to-end/api/chat.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1922,7 +1922,7 @@ describe('[Chat]', () => {
19221922
.expect(400)
19231923
.expect((res) => {
19241924
expect(res.body).to.have.property('success', false);
1925-
expect(res.body).to.have.property('errorType', 'invalid-params');
1925+
expect(res.body).to.have.property('errorType', 'error-invalid-params');
19261926
});
19271927
});
19281928

@@ -1938,7 +1938,7 @@ describe('[Chat]', () => {
19381938
.expect(400)
19391939
.expect((res) => {
19401940
expect(res.body).to.have.property('success', false);
1941-
expect(res.body).to.have.property('errorType', 'invalid-params');
1941+
expect(res.body).to.have.property('errorType', 'error-invalid-params');
19421942
});
19431943
});
19441944

@@ -1954,7 +1954,7 @@ describe('[Chat]', () => {
19541954
.expect(400)
19551955
.expect((res) => {
19561956
expect(res.body).to.have.property('success', false);
1957-
expect(res.body).to.have.property('errorType', 'invalid-params');
1957+
expect(res.body).to.have.property('errorType', 'error-invalid-params');
19581958
});
19591959
});
19601960

@@ -2241,7 +2241,7 @@ describe('[Chat]', () => {
22412241
.expect(400)
22422242
.expect((res) => {
22432243
expect(res.body).to.have.property('success', false);
2244-
expect(res.body).to.have.property('errorType', 'invalid-params');
2244+
expect(res.body).to.have.property('errorType', 'error-invalid-params');
22452245
});
22462246
});
22472247
it('should fail deleting a message if no room id is provided', async () => {
@@ -2255,7 +2255,7 @@ describe('[Chat]', () => {
22552255
.expect(400)
22562256
.expect((res) => {
22572257
expect(res.body).to.have.property('success', false);
2258-
expect(res.body).to.have.property('errorType', 'invalid-params');
2258+
expect(res.body).to.have.property('errorType', 'error-invalid-params');
22592259
});
22602260
});
22612261
it('should fail deleting a message if it is not in the provided room', async () => {
@@ -3416,7 +3416,7 @@ describe('[Chat]', () => {
34163416
.expect(400)
34173417
.expect((res) => {
34183418
expect(res.body).to.have.property('success', false);
3419-
expect(res.body.errorType).to.be.equal('invalid-params');
3419+
expect(res.body.errorType).to.be.equal('error-invalid-params');
34203420
})
34213421
.end(done);
34223422
});
@@ -3475,7 +3475,7 @@ describe('[Chat]', () => {
34753475
.expect(400)
34763476
.expect((res) => {
34773477
expect(res.body).to.have.property('success', false);
3478-
expect(res.body.errorType).to.be.equal('invalid-params');
3478+
expect(res.body.errorType).to.be.equal('error-invalid-params');
34793479
})
34803480
.end(done);
34813481
});
@@ -3676,7 +3676,7 @@ describe('[Chat]', () => {
36763676
.expect(400)
36773677
.expect((res) => {
36783678
expect(res.body).to.have.property('success', false);
3679-
expect(res.body.errorType).to.be.equal('invalid-params');
3679+
expect(res.body.errorType).to.be.equal('error-invalid-params');
36803680
expect(res.body.error).to.include(`must have required property 'roomId'`);
36813681
})
36823682
.end(done);
@@ -3736,7 +3736,7 @@ describe('[Chat]', () => {
37363736
.expect(400)
37373737
.expect((res) => {
37383738
expect(res.body).to.have.property('success', false);
3739-
expect(res.body.errorType).to.be.equal('invalid-params');
3739+
expect(res.body.errorType).to.be.equal('error-invalid-params');
37403740
expect(res.body.error).to.include('must be equal to one of the allowed values');
37413741
})
37423742
.end(done);
@@ -4111,7 +4111,7 @@ describe('Threads', () => {
41114111
.expect(400)
41124112
.expect((res) => {
41134113
expect(res.body).to.have.property('success', false);
4114-
expect(res.body).to.have.property('errorType', 'invalid-params');
4114+
expect(res.body).to.have.property('errorType', 'error-invalid-params');
41154115
});
41164116
});
41174117

@@ -4127,7 +4127,7 @@ describe('Threads', () => {
41274127
.expect(400)
41284128
.expect((res) => {
41294129
expect(res.body).to.have.property('success', false);
4130-
expect(res.body).to.have.property('errorType', 'invalid-params');
4130+
expect(res.body).to.have.property('errorType', 'error-invalid-params');
41314131
});
41324132
});
41334133

@@ -4310,7 +4310,7 @@ describe('Threads', () => {
43104310
.expect(400)
43114311
.expect((res) => {
43124312
expect(res.body).to.have.property('success', false);
4313-
expect(res.body).to.have.property('errorType', 'invalid-params');
4313+
expect(res.body).to.have.property('errorType', 'error-invalid-params');
43144314
})
43154315
.end(done);
43164316
});
@@ -4328,7 +4328,7 @@ describe('Threads', () => {
43284328
.expect(400)
43294329
.expect((res) => {
43304330
expect(res.body).to.have.property('success', false);
4331-
expect(res.body).to.have.property('errorType', 'invalid-params');
4331+
expect(res.body).to.have.property('errorType', 'error-invalid-params');
43324332
})
43334333
.end(done);
43344334
});
@@ -4347,7 +4347,7 @@ describe('Threads', () => {
43474347
.expect(400)
43484348
.expect((res) => {
43494349
expect(res.body).to.have.property('success', false);
4350-
expect(res.body).to.have.property('errorType', 'invalid-params');
4350+
expect(res.body).to.have.property('errorType', 'error-invalid-params');
43514351
})
43524352
.end(done);
43534353
});
@@ -4568,7 +4568,7 @@ describe('Threads', () => {
45684568
.expect(400)
45694569
.expect((res) => {
45704570
expect(res.body).to.have.property('success', false);
4571-
expect(res.body).to.have.property('errorType', 'invalid-params');
4571+
expect(res.body).to.have.property('errorType', 'error-invalid-params');
45724572
})
45734573
.end(done);
45744574
});
@@ -4586,7 +4586,7 @@ describe('Threads', () => {
45864586
.expect(400)
45874587
.expect((res) => {
45884588
expect(res.body).to.have.property('success', false);
4589-
expect(res.body).to.have.property('errorType', 'invalid-params');
4589+
expect(res.body).to.have.property('errorType', 'error-invalid-params');
45904590
})
45914591
.end(done);
45924592
});
@@ -4605,7 +4605,7 @@ describe('Threads', () => {
46054605
.expect(400)
46064606
.expect((res) => {
46074607
expect(res.body).to.have.property('success', false);
4608-
expect(res.body).to.have.property('errorType', 'invalid-params');
4608+
expect(res.body).to.have.property('errorType', 'error-invalid-params');
46094609
})
46104610
.end(done);
46114611
});

0 commit comments

Comments
 (0)