From 85a3f7ba829d25aa56bc8bc9b425ebb7871c9e29 Mon Sep 17 00:00:00 2001 From: Jorik Tangelder Date: Sun, 3 Jan 2016 12:08:51 +0100 Subject: [PATCH] Add manual tests This would help testing browser support. --- test/manual/basic.html | 21 +++++++++++++++++++++ test/manual/cors.html | 20 ++++++++++++++++++++ test/manual/fixture.json | 3 +++ test/manual/promise.js | 9 +++++++++ 4 files changed, 53 insertions(+) create mode 100644 test/manual/basic.html create mode 100644 test/manual/cors.html create mode 100644 test/manual/fixture.json create mode 100644 test/manual/promise.js diff --git a/test/manual/basic.html b/test/manual/basic.html new file mode 100644 index 0000000..35fa649 --- /dev/null +++ b/test/manual/basic.html @@ -0,0 +1,21 @@ + + + + + + + +An alert should be shown with the {"name":"axios"} + + + + + + + \ No newline at end of file diff --git a/test/manual/cors.html b/test/manual/cors.html new file mode 100644 index 0000000..da6e946 --- /dev/null +++ b/test/manual/cors.html @@ -0,0 +1,20 @@ + + + + + + + +An alert should be shown with {"status":"ok"} + + + + + + + \ No newline at end of file diff --git a/test/manual/fixture.json b/test/manual/fixture.json new file mode 100644 index 0000000..5580765 --- /dev/null +++ b/test/manual/fixture.json @@ -0,0 +1,3 @@ +{ + "name": "axios" +} \ No newline at end of file diff --git a/test/manual/promise.js b/test/manual/promise.js new file mode 100644 index 0000000..2d48351 --- /dev/null +++ b/test/manual/promise.js @@ -0,0 +1,9 @@ +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE + * @version 3.0.2 + */ + +(function(){"use strict";function lib$es6$promise$utils$$objectOrFunction(x){return typeof x==="function"||typeof x==="object"&&x!==null}function lib$es6$promise$utils$$isFunction(x){return typeof x==="function"}function lib$es6$promise$utils$$isMaybeThenable(x){return typeof x==="object"&&x!==null}var lib$es6$promise$utils$$_isArray;if(!Array.isArray){lib$es6$promise$utils$$_isArray=function(x){return Object.prototype.toString.call(x)==="[object Array]"}}else{lib$es6$promise$utils$$_isArray=Array.isArray}var lib$es6$promise$utils$$isArray=lib$es6$promise$utils$$_isArray;var lib$es6$promise$asap$$len=0;var lib$es6$promise$asap$$toString={}.toString;var lib$es6$promise$asap$$vertxNext;var lib$es6$promise$asap$$customSchedulerFn;var lib$es6$promise$asap$$asap=function asap(callback,arg){lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len]=callback;lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len+1]=arg;lib$es6$promise$asap$$len+=2;if(lib$es6$promise$asap$$len===2){if(lib$es6$promise$asap$$customSchedulerFn){lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush)}else{lib$es6$promise$asap$$scheduleFlush()}}};function lib$es6$promise$asap$$setScheduler(scheduleFn){lib$es6$promise$asap$$customSchedulerFn=scheduleFn}function lib$es6$promise$asap$$setAsap(asapFn){lib$es6$promise$asap$$asap=asapFn}var lib$es6$promise$asap$$browserWindow=typeof window!=="undefined"?window:undefined;var lib$es6$promise$asap$$browserGlobal=lib$es6$promise$asap$$browserWindow||{};var lib$es6$promise$asap$$BrowserMutationObserver=lib$es6$promise$asap$$browserGlobal.MutationObserver||lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver;var lib$es6$promise$asap$$isNode=typeof process!=="undefined"&&{}.toString.call(process)==="[object process]";var lib$es6$promise$asap$$isWorker=typeof Uint8ClampedArray!=="undefined"&&typeof importScripts!=="undefined"&&typeof MessageChannel!=="undefined";function lib$es6$promise$asap$$useNextTick(){return function(){process.nextTick(lib$es6$promise$asap$$flush)}}function lib$es6$promise$asap$$useVertxTimer(){return function(){lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush)}}function lib$es6$promise$asap$$useMutationObserver(){var iterations=0;var observer=new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush);var node=document.createTextNode("");observer.observe(node,{characterData:true});return function(){node.data=iterations=++iterations%2}}function lib$es6$promise$asap$$useMessageChannel(){var channel=new MessageChannel;channel.port1.onmessage=lib$es6$promise$asap$$flush;return function(){channel.port2.postMessage(0)}}function lib$es6$promise$asap$$useSetTimeout(){return function(){setTimeout(lib$es6$promise$asap$$flush,1)}}var lib$es6$promise$asap$$queue=new Array(1e3);function lib$es6$promise$asap$$flush(){for(var i=0;i