From 75b3a81dad00eca26d725decfeb7799e9a5ecc2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 1 Jun 2020 23:00:26 -0400 Subject: [PATCH] fix: clear error log before checking fix intermittent test failure due to analytics being written every 10 seconds --- test/controllers-admin.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/controllers-admin.js b/test/controllers-admin.js index 1a2cffac61..283c77de8f 100644 --- a/test/controllers-admin.js +++ b/test/controllers-admin.js @@ -392,11 +392,14 @@ describe('Admin Controllers', function () { }); it('should load /admin/advanced/errors/export', function (done) { - request(nconf.get('url') + '/api/admin/advanced/errors/export', { jar: jar }, function (err, res, body) { + meta.errors.clear(function (err) { assert.ifError(err); - assert.equal(res.statusCode, 200); - assert.strictEqual(body, ''); - done(); + request(nconf.get('url') + '/api/admin/advanced/errors/export', { jar: jar }, function (err, res, body) { + assert.ifError(err); + assert.equal(res.statusCode, 200); + assert.strictEqual(body, ''); + done(); + }); }); });