diff --git a/test/api-acceptance/admin/db_spec.js b/test/api-acceptance/admin/db_spec.js index c166b47f51..a9ffb5966d 100644 --- a/test/api-acceptance/admin/db_spec.js +++ b/test/api-acceptance/admin/db_spec.js @@ -49,11 +49,11 @@ describe('DB API', function () { should.exist(jsonResponse.db); jsonResponse.db.should.have.length(1); - const dataKeys = Object.keys(exportedBodyLatest().db[0].data); + const dataKeys = Object.keys(exportedBodyLatest().db[0].data).sort(); // 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); + Object.keys(jsonResponse.db[0].data).sort().should.be.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 1669e1ca6d..d386a76efb 100644 --- a/test/regression/exporter/exporter_spec.js +++ b/test/regression/exporter/exporter_spec.js @@ -68,8 +68,8 @@ describe('Exporter', function () { // 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)); + Object.keys(exportData.data).sort().should.eql(tables.sort()); + Object.keys(exportData.data).sort().should.containDeep(Object.keys(exportedBodyLatest().db[0].data)); exportData.meta.version.should.equal(ghostVersion.full); // excludes table should contain no data