2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-02 16:04:10 +03:00

Add manual tests

This would help testing browser support.
This commit is contained in:
Jorik Tangelder
2016-01-03 12:08:51 +01:00
parent 986647be59
commit 85a3f7ba82
4 changed files with 53 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
An alert should be shown with the <code>{"name":"axios"}</code>
<script src="promise.js"></script>
<script src="../../dist/axios.js"></script>
<script>
axios.get('./fixture.json').then(function(response) {
console.log(response);
alert(JSON.stringify(response.data));
alert('response headers:\n\n' + JSON.stringify(response.headers));
}, function(err) { console.log(err) });
</script>
</body>
</html>
+20
View File
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
An alert should be shown with <code>{"status":"ok"}</code>
<script src="promise.js"></script>
<script src="../../dist/axios.js"></script>
<script>
axios.get('http://cors-test.appspot.com/test').then(function(response) {
alert(JSON.stringify(response.data));
alert('response headers:\n\n' + JSON.stringify(response.headers));
}, function(err) { console.log(err) });
</script>
</body>
</html>
+3
View File
@@ -0,0 +1,3 @@
{
"name": "axios"
}
File diff suppressed because one or more lines are too long