mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
Release/v0.22.0 (#4107)
* fix/Avoid package.json import; (#4041) * Added auto-generated config module `env/data.js` for importing package environment vars without importing the whole `package.json`; Refactored `http.js` to use `env/data.js` instead of package.json; * Added `env/data.js`; Added `env/README.md`; * Feat/export package version constant (#4065) * Added auto-generated config module `env/data.js` for importing package environment vars without importing the whole `package.json`; Refactored `http.js` to use `env/data.js` instead of package.json; * Added `env/data.js`; Added `env/README.md`; * Export package version constant; * Fixed cancelToken leakage; Added AbortController support; (#3305) * Fixed cancelToken leakage; Added AbortController support; * Fixed typings; * Documented `signal` option; * Added processing of early cancellation using AbortController without sending a request; Co-authored-by: Jay <jasonsaayman@gmail.com> * Updating CI to run on release branches * Fixed default transitional config for custom Axios instance; (#4052) Refactored `/core/mergeConfig`; Co-authored-by: Jay <jasonsaayman@gmail.com> * Prepping v0.22.0 for release * Updated date Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
This commit is contained in:
@@ -2,23 +2,8 @@
|
||||
|
||||
var validator = require('../../../lib/helpers/validator');
|
||||
|
||||
describe('validator::isOlderVersion', function () {
|
||||
it('should return true if dest version is older than the package version', function () {
|
||||
expect(validator.isOlderVersion('0.0.1', '1.0.0')).toEqual(true);
|
||||
expect(validator.isOlderVersion('0.0.1', '0.1.0')).toEqual(true);
|
||||
expect(validator.isOlderVersion('0.0.1', '0.0.1')).toEqual(false);
|
||||
|
||||
|
||||
expect(validator.isOlderVersion('100.0.0', '1.0.0')).toEqual(false);
|
||||
expect(validator.isOlderVersion('100.0.0', '0.1.0')).toEqual(false);
|
||||
expect(validator.isOlderVersion('100.0.0', '0.0.1')).toEqual(false);
|
||||
|
||||
expect(validator.isOlderVersion('0.10000.0', '1000.0.1')).toEqual(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('validator::assertOptions', function () {
|
||||
it('should throw only if unknown an option was passed', function () {
|
||||
describe('validator::assertOptions', function() {
|
||||
it('should throw only if unknown an option was passed', function() {
|
||||
expect(function() {
|
||||
validator.assertOptions({
|
||||
x: true
|
||||
@@ -37,7 +22,7 @@ describe('validator::assertOptions', function () {
|
||||
}).not.toThrow(new Error('Unknown option x'));
|
||||
});
|
||||
|
||||
it('should throw TypeError only if option type doesn\'t match', function () {
|
||||
it('should throw TypeError only if option type doesn\'t match', function() {
|
||||
expect(function() {
|
||||
validator.assertOptions({
|
||||
x: 123
|
||||
|
||||
Reference in New Issue
Block a user