mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
18 lines
466 B
JavaScript
18 lines
466 B
JavaScript
'use strict';
|
|
|
|
const { expect } = require('chai');
|
|
const requireUncached = require('ncjsm/require-uncached');
|
|
|
|
describe('isInChina', () => {
|
|
it('should return boolean', () => {
|
|
expect(typeof require('./isInChina')).to.equal('boolean');
|
|
});
|
|
|
|
it('should support SLS_GEO_LOCATION', () => {
|
|
process.env.SLS_GEO_LOCATION = 'cn';
|
|
expect(requireUncached(require.resolve('./isInChina'), () => require('./isInChina'))).to.equal(
|
|
true
|
|
);
|
|
});
|
|
});
|