Skip to content

Commit b260d86

Browse files
committed
comments
1 parent 5f4b268 commit b260d86

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/integration/generateAndValidate.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ const bsonDocuments = [{
3030
describe.only('Documents -> Generate schema -> Validate Documents against the schema', function() {
3131
it('Standard JSON Schema with Relaxed EJSON', async function() {
3232
const ajv = new Ajv2020();
33-
// First we get the schema
33+
// First we get the JSON schema from BSON
3434
const analyzedDocuments = await analyzeDocuments(bsonDocuments);
3535
const schema = await analyzedDocuments.getStandardJsonSchema();
3636
const validate = ajv.compile(schema);
3737
for (const doc of bsonDocuments) {
38-
// Then we get EJSON documents
38+
// Then we get EJSON
3939
const relaxedEJSONDoc = EJSON.serialize(doc, { relaxed: true });
40-
// Which we validate against the schema
40+
// And validate it agains the JSON Schema
4141
const valid = validate(relaxedEJSONDoc);
4242
if (validate.errors) console.error('Validation failed', validate.errors);
4343
assert.strictEqual(valid, true);

0 commit comments

Comments
 (0)