This repository has been archived on 2020-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
TripSit_Suite/node_modules/has-cors/test.js
2020-11-01 22:46:04 +00:00

25 lines
510 B
JavaScript

var expect = require('chai').expect;
describe('has-cors', function() {
beforeEach(function() {
// make sure result is not cached
delete require.cache[require.resolve('./')];
});
it('should not have cors', function() {
var hasCors = require('./');
expect(hasCors).to.be.false;
});
it('should have cors', function() {
global.XMLHttpRequest = function() {
this.withCredentials = true;
};
var hasCors = require('./');
expect(hasCors).to.be.true;
});
});