Created
May 8, 2018 15:00
-
-
Save mokus80/61bc2b01cc441202a9a5ce6b9deac509 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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