MLE-24976 Couple of Polaris fixes in tests#1029
Conversation
|
Copyright Validation Results ✅ Valid Files
✅ All files have valid copyright headers! |
There was a problem hiding this comment.
Pull Request Overview
This PR adds assertion checks in test files to verify the existence and type of response objects before accessing their properties, improving test robustness and preventing potential null reference errors.
Key Changes:
- Added existence checks for response objects in binary document tests
- Added existence and type validation for documents array in data movement transformation tests
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test-complete/nodejs-documents-read-chunk.js | Added existence check for response object before property access |
| test-complete/nodejs-dmsdk-queryToTransformAll.js | Added existence and array type checks for documents object |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| async function verifyDocs(value) { | ||
| const documents = await dbWriter.documents.read(uris).result(); | ||
| should.exist(documents); | ||
| documents.should.be.an.Array(); |
There was a problem hiding this comment.
The correct assertion syntax is documents.should.be.an('array') (lowercase string) or documents.should.be.an.instanceOf(Array). The current syntax documents.should.be.an.Array() is incorrect and will likely fail.
| documents.should.be.an.Array(); | |
| documents.should.be.an('array'); |
No description provided.