mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
fix(Tests): updating regex to allow for pre-releases
This commit is contained in:
@@ -447,7 +447,7 @@ describe('supports http with nodejs', function () {
|
|||||||
res.end(req.headers['user-agent']);
|
res.end(req.headers['user-agent']);
|
||||||
}).listen(4444, function () {
|
}).listen(4444, function () {
|
||||||
axios.get('http://localhost:4444/').then(function (res) {
|
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();
|
done();
|
||||||
}).catch(done);
|
}).catch(done);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user