@@ -5,30 +5,34 @@ QUnit = require('steal-qunit');
5
5
6
6
QUnit . module ( "can-util/dom/ajax" ) ;
7
7
8
- QUnit . asyncTest ( "basic get request" , function ( ) {
9
- ajax ( {
10
- type : "get" ,
11
- url : __dirname + "/test-result.json"
12
- } ) . then ( function ( resp ) {
13
- QUnit . equal ( resp . message , "VALUE" ) ;
14
- start ( ) ;
8
+ if ( __dirname !== '/' ) {
9
+ QUnit . asyncTest ( "basic get request" , function ( ) {
10
+ ajax ( {
11
+ type : "get" ,
12
+ url : __dirname + "/test-result.json"
13
+ } ) . then ( function ( resp ) {
14
+ QUnit . equal ( resp . message , "VALUE" ) ;
15
+ start ( ) ;
16
+ } ) ;
15
17
} ) ;
16
- } ) ;
18
+ }
17
19
18
20
QUnit . test ( "added to namespace (#99)" , function ( ) {
19
21
QUnit . equal ( namespace . ajax , ajax ) ;
20
22
} ) ;
21
23
22
- QUnit . asyncTest ( "GET requests with dataType parse JSON (#106)" , function ( ) {
23
- ajax ( {
24
- type : "get" ,
25
- url : __dirname + "/test-result.txt" ,
26
- dataType : "json"
27
- } ) . then ( function ( resp ) {
28
- QUnit . equal ( resp . message , "VALUE" ) ;
29
- start ( ) ;
24
+ if ( __dirname !== '/' ) {
25
+ QUnit . asyncTest ( "GET requests with dataType parse JSON (#106)" , function ( ) {
26
+ ajax ( {
27
+ type : "get" ,
28
+ url : __dirname + "/test-result.txt" ,
29
+ dataType : "json"
30
+ } ) . then ( function ( resp ) {
31
+ QUnit . equal ( resp . message , "VALUE" ) ;
32
+ start ( ) ;
33
+ } ) ;
30
34
} ) ;
31
- } ) ;
35
+ }
32
36
33
37
QUnit . asyncTest ( "ignores case of type parameter for a post request (#100)" , function ( ) {
34
38
var oldXhr = window . XMLHttpRequest || window . ActiveXObject ,
@@ -96,7 +100,7 @@ if(typeof XDomainRequest === 'undefined') {
96
100
} ) ;
97
101
}
98
102
99
- if ( System . env !== 'canjs-test' ) {
103
+ if ( System . env !== 'canjs-test' && __dirname !== '/' ) {
100
104
// Brittle in IE 9
101
105
QUnit . asyncTest ( "abort" , function ( ) {
102
106
var promise = ajax ( {
0 commit comments