2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-15 11:59:42 +03:00

test: correct relationship between filename and test codes (#6155)

Co-authored-by: zhangh-cs <zhangh-cs@glodon.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
JohnTitor
2025-11-12 14:16:59 +08:00
committed by GitHub
parent 65a7584eda
commit 15bf9563f6
2 changed files with 14 additions and 14 deletions
+8 -6
View File
@@ -1,10 +1,12 @@
import {kindOfTest} from '../../../lib/utils';
import utils from '../../../lib/utils';
describe('utils::endsWith', function () {
it('should return true if the string ends with passed substring', function () {
const test = kindOfTest('number');
const {kindOf} = utils;
expect(test(123)).toEqual(true);
expect(test('123')).toEqual(false);
describe('utils::kindOf', function () {
it('should return object tag', function () {
expect(kindOf({})).toEqual('object');
// cached result
expect(kindOf({})).toEqual('object');
expect(kindOf([])).toEqual('array');
});
});
+6 -8
View File
@@ -1,12 +1,10 @@
import utils from '../../../lib/utils';
import {kindOfTest} from '../../../lib/utils';
const {kindOf} = utils;
describe('utils::kindOfTest', function () {
it('should return true if the type is matched', function () {
const test = kindOfTest('number');
describe('utils::kindOf', function () {
it('should return object tag', function () {
expect(kindOf({})).toEqual('object');
// cached result
expect(kindOf({})).toEqual('object');
expect(kindOf([])).toEqual('array');
expect(test(123)).toEqual(true);
expect(test('123')).toEqual(false);
});
});