diff --git a/test/api-acceptance/admin/db_spec.js b/test/api-acceptance/admin/db_spec.js index 1d95f02545..c166b47f51 100644 --- a/test/api-acceptance/admin/db_spec.js +++ b/test/api-acceptance/admin/db_spec.js @@ -51,9 +51,9 @@ describe('DB API', function () { const dataKeys = Object.keys(exportedBodyLatest().db[0].data); - Object.keys(jsonResponse.db[0].data).length.should.eql(28); - Object.keys(jsonResponse.db[0].data).length.should.eql(dataKeys.length); - jsonResponse.db[0].data.should.have.only.keys(...dataKeys); + // NOTE: using `Object.keys` here instead of `should.have.only.keys` assertion + // because when `have.only.keys` fails there's no useful diff + Object.keys(jsonResponse.db[0].data).should.eql(dataKeys); }); it('Can delete all content', async function () { diff --git a/test/regression/exporter/exporter_spec.js b/test/regression/exporter/exporter_spec.js index b5f0914d00..1669e1ca6d 100644 --- a/test/regression/exporter/exporter_spec.js +++ b/test/regression/exporter/exporter_spec.js @@ -66,8 +66,10 @@ describe('Exporter', function () { should.exist(exportData.meta); should.exist(exportData.data); - exportData.data.should.have.only.keys(...tables); - exportData.data.should.have.keys(...Object.keys(exportedBodyLatest().db[0].data)); + // NOTE: using `Object.keys` here instead of `should.have.only.keys` assertion + // because when `have.only.keys` fails there's no useful diff + Object.keys(exportData.data).should.eql(tables); + Object.keys(exportData.data).should.containDeep(Object.keys(exportedBodyLatest().db[0].data)); exportData.meta.version.should.equal(ghostVersion.full); // excludes table should contain no data