Skip to content

Commit cb1ecbf

Browse files
committed
update test
1 parent b468e64 commit cb1ecbf

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/compass-schema/src/stores/store.spec.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,12 @@ describe('Schema Store', function () {
178178
expect(exportStatus).to.equal('complete');
179179
expect(!!errorMessage).to.be.false;
180180
expect(exportedSchema).not.to.be.undefined;
181-
expect(JSON.parse(exportedSchema!).type).to.equal(undefined);
182-
expect(JSON.parse(exportedSchema!).bsonType).to.equal('object');
183-
expect(JSON.parse(exportedSchema!)['$schema']).to.equal(undefined);
184-
expect(JSON.parse(exportedSchema!).required).to.deep.equal(['name']);
185-
expect(JSON.parse(exportedSchema!).properties).to.deep.equal({
181+
const parsedSchema = JSON.parse(exportedSchema!).$jsonSchema;
182+
expect(parsedSchema.type).to.equal(undefined);
183+
expect(parsedSchema.bsonType).to.equal('object');
184+
expect(parsedSchema['$schema']).to.equal(undefined);
185+
expect(parsedSchema.required).to.deep.equal(['name']);
186+
expect(parsedSchema.properties).to.deep.equal({
186187
name: { bsonType: 'string' },
187188
});
188189
expect(filename).to.equal('schema-db-coll-mongoDBJSON.json');

0 commit comments

Comments
 (0)