Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xjbieke
axios
提交
46a9639e
A
axios
项目概览
xjbieke
/
axios
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
axios
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
46a9639e
编写于
10月 29, 2016
作者:
N
Nick Uraltsev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixing sporadically failing tests
上级
417913bf
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
18 addition
and
18 deletion
+18
-18
test/specs/__helpers.js
test/specs/__helpers.js
+1
-1
test/specs/instance.spec.js
test/specs/instance.spec.js
+1
-1
test/specs/interceptors.spec.js
test/specs/interceptors.spec.js
+8
-8
test/specs/promise.spec.js
test/specs/promise.spec.js
+1
-1
test/specs/requests.spec.js
test/specs/requests.spec.js
+5
-5
test/specs/transform.spec.js
test/specs/transform.spec.js
+2
-2
未找到文件。
test/specs/__helpers.js
浏览文件 @
46a9639e
...
...
@@ -76,7 +76,7 @@ setupBasicAuthTest = function setupBasicAuthTest() {
expect
(
request
.
requestHeaders
[
'
Authorization
'
]).
toEqual
(
'
Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
'
);
done
();
},
0
);
},
10
0
);
});
it
(
'
should fail to encode HTTP Basic auth credentials with non-Latin1 characters
'
,
function
(
done
)
{
...
...
test/specs/instance.spec.js
浏览文件 @
46a9639e
...
...
@@ -94,7 +94,7 @@ describe('instance', function () {
expect
(
response
.
config
.
foo
).
toEqual
(
undefined
);
expect
(
response
.
config
.
bar
).
toEqual
(
true
);
done
();
});
}
,
100
);
});
});
});
test/specs/interceptors.spec.js
浏览文件 @
46a9639e
...
...
@@ -52,7 +52,7 @@ describe('interceptors', function () {
setTimeout
(
function
()
{
config
.
headers
.
async
=
'
promise
'
;
resolve
(
config
);
},
10
);
},
10
0
);
});
});
...
...
@@ -105,11 +105,11 @@ describe('interceptors', function () {
status
:
200
,
responseText
:
'
OK
'
});
setTimeout
(
function
()
{
expect
(
response
.
data
).
toBe
(
'
OK - modified by interceptor
'
);
done
();
});
}
,
100
);
});
});
...
...
@@ -135,7 +135,7 @@ describe('interceptors', function () {
setTimeout
(
function
()
{
expect
(
response
.
data
).
toBe
(
'
stuff
'
);
done
();
});
}
,
100
);
});
});
...
...
@@ -194,11 +194,11 @@ describe('interceptors', function () {
status
:
200
,
responseText
:
'
OK
'
});
setTimeout
(
function
()
{
expect
(
response
.
data
).
toBe
(
'
OK123
'
);
done
();
});
}
,
100
);
});
});
...
...
@@ -233,10 +233,10 @@ describe('interceptors', function () {
setTimeout
(
function
()
{
expect
(
response
.
data
).
toBe
(
'
OK13
'
);
done
();
});
}
,
100
);
});
});
it
(
'
should execute interceptors before transformers
'
,
function
(
done
)
{
axios
.
interceptors
.
request
.
use
(
function
(
config
)
{
config
.
data
.
baz
=
'
qux
'
;
...
...
test/specs/promise.spec.js
浏览文件 @
46a9639e
...
...
@@ -27,7 +27,7 @@ describe('promise', function () {
expect
(
response
.
headers
[
'
content-type
'
]).
toEqual
(
'
application/json
'
);
expect
(
response
.
config
.
url
).
toEqual
(
'
/foo
'
);
done
();
});
}
,
100
);
});
});
...
...
test/specs/requests.spec.js
浏览文件 @
46a9639e
...
...
@@ -141,7 +141,7 @@ describe('requests', function () {
expect
(
response
.
data
.
error
).
toEqual
(
'
BAD USERNAME
'
);
expect
(
response
.
data
.
code
).
toEqual
(
1
);
done
();
});
}
,
100
);
});
});
...
...
@@ -168,7 +168,7 @@ describe('requests', function () {
expect
(
response
.
statusText
).
toEqual
(
'
OK
'
);
expect
(
response
.
headers
[
'
content-type
'
]).
toEqual
(
'
application/json
'
);
done
();
});
}
,
100
);
});
});
...
...
@@ -196,7 +196,7 @@ describe('requests', function () {
expect
(
response
.
statusText
).
toEqual
(
'
OK
'
);
expect
(
response
.
headers
[
'
content-type
'
]).
toEqual
(
'
application/json
'
);
done
();
});
}
,
100
);
});
});
...
...
@@ -218,7 +218,7 @@ describe('requests', function () {
expect
(
response
.
status
).
toEqual
(
204
);
expect
(
response
.
statusText
).
toEqual
(
'
No Content
'
);
done
();
});
}
,
100
);
});
});
...
...
@@ -317,7 +317,7 @@ describe('requests', function () {
setTimeout
(
function
()
{
expect
(
response
.
data
.
byteLength
).
toBe
(
22
);
done
();
});
}
,
100
);
});
});
...
...
test/specs/transform.spec.js
浏览文件 @
46a9639e
...
...
@@ -32,12 +32,12 @@ describe('transform', function () {
status
:
200
,
responseText
:
'
{"foo": "bar"}
'
});
setTimeout
(
function
()
{
expect
(
typeof
response
.
data
).
toEqual
(
'
object
'
);
expect
(
response
.
data
.
foo
).
toEqual
(
'
bar
'
);
done
();
});
}
,
100
);
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录