mirror of
https://github.com/tenrok/axios.git
synced 2026-06-08 17:22:34 +03:00
Cleaning up tests a bit
This commit is contained in:
@@ -12,9 +12,7 @@ describe('instance', function () {
|
||||
it('should make an http request', function (done) {
|
||||
var instance = axios.create();
|
||||
|
||||
instance.request({
|
||||
url: '/foo'
|
||||
});
|
||||
instance.get('/foo');
|
||||
|
||||
setTimeout(function () {
|
||||
request = jasmine.Ajax.requests.mostRecent();
|
||||
@@ -27,9 +25,7 @@ describe('instance', function () {
|
||||
it('should use instance options', function (done) {
|
||||
var instance = axios.create({ timeout: 1000 });
|
||||
|
||||
instance.request({
|
||||
url: '/foo'
|
||||
});
|
||||
instance.get('/foo');
|
||||
|
||||
setTimeout(function () {
|
||||
request = jasmine.Ajax.requests.mostRecent();
|
||||
@@ -52,14 +48,12 @@ describe('instance', function () {
|
||||
});
|
||||
|
||||
var response;
|
||||
instance.request({
|
||||
url: '/foo'
|
||||
}).then(function (res) {
|
||||
instance.get('/foo').then(function (res) {
|
||||
response = res;
|
||||
});
|
||||
|
||||
setTimeout(function () {
|
||||
request = jasmine.Ajax.requests.mostRecent();
|
||||
var request = jasmine.Ajax.requests.mostRecent();
|
||||
|
||||
request.respondWith({
|
||||
status: 200
|
||||
|
||||
Reference in New Issue
Block a user