From d82ea47dd3795a5e4d9903c3ce1323e089b7d1a5 Mon Sep 17 00:00:00 2001 From: Jay Date: Tue, 31 May 2022 21:12:55 +0200 Subject: [PATCH] fix(Tests): updating regex to allow for pre-releases --- test/unit/adapters/http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/adapters/http.js b/test/unit/adapters/http.js index ed3db64..11e2fa3 100644 --- a/test/unit/adapters/http.js +++ b/test/unit/adapters/http.js @@ -447,7 +447,7 @@ describe('supports http with nodejs', function () { res.end(req.headers['user-agent']); }).listen(4444, function () { axios.get('http://localhost:4444/').then(function (res) { - assert.ok(/^axios\/[\d.]+$/.test(res.data), `User-Agent header does not match: ${res.data}`); + assert.ok(/^axios\/[\d.]+[-]?[a-z]*[.]?[\d]+$/.test(res.data), `User-Agent header does not match: ${res.data}`); done(); }).catch(done); });