Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mokus80/61bc2b01cc441202a9a5ce6b9deac509 to your computer and use it in GitHub Desktop.
Save mokus80/61bc2b01cc441202a9a5ce6b9deac509 to your computer and use it in GitHub Desktop.
context('when in population', () => {
// const promise = sinon.stub().resolves(true);
const stubs = {
'../../src/population/filters/countryCodeAlpha2/geoipService': Promise.resolve(true),
'@global': true
};
const filter = proxyquire('../src/population', stubs);
const population = {
countryCodeAlpha2: {
include: ['ENG']
}
}
const params = {
locale: 'en',
requestIp: '111'
}
it('returns true', (done) => {
filter(population, params).then(res => {
expect(res).to.be.true;
done();
})
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment