Make browser-request happy and provide a global shim for XHR in issue225 test
This commit is contained in:
parent
5c9ba07706
commit
a38a32d5fb
|
@ -88,7 +88,7 @@ module.exports = function(grunt) {
|
||||||
mocha: {
|
mocha: {
|
||||||
// Run all tests (e.g., tests require()'ed in tests/index.js) and also tests/bugs/issue225.js
|
// Run all tests (e.g., tests require()'ed in tests/index.js) and also tests/bugs/issue225.js
|
||||||
// separately, since it can't be included in a browserify build.
|
// separately, since it can't be included in a browserify build.
|
||||||
command: './node_modules/.bin/mocha --reporter list tests/index.js tests/bugs/issue225.js'
|
command: './node_modules/.bin/mocha --reporter list tests/index.js && ./node_modules/.bin/mocha --reporter list tests/bugs/issue225.js'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
var requirejs = require('requirejs');
|
var requirejs = require('requirejs');
|
||||||
var expect = require('chai').expect;
|
var expect = require('chai').expect;
|
||||||
|
|
||||||
|
// browser-request assumes access to XHR
|
||||||
GLOBAL.XMLHttpRequest = {};
|
GLOBAL.XMLHttpRequest = {};
|
||||||
|
|
||||||
describe('require.js should be able to use built Filer, issue 225', function() {
|
describe('require.js should be able to use built Filer, issue 225', function() {
|
||||||
|
|
Loading…
Reference in New Issue