fix: relax app.getLocaleCountryCode() test (#29679)
If the app is run with LC_ALL=C on Linux, the test would fail as app.getLocaleCountryCode() would return "". Signed-off-by: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
parent
e7ae6edbd4
commit
cfc846a337
1 changed files with 3 additions and 6 deletions
|
@ -122,12 +122,9 @@ describe('app module', () => {
|
|||
|
||||
describe('app.getLocaleCountryCode()', () => {
|
||||
it('should be empty or have length of two', () => {
|
||||
let expectedLength = 2;
|
||||
if (process.platform === 'linux' && process.env.CI) {
|
||||
// Linux CI machines have no locale.
|
||||
expectedLength = 0;
|
||||
}
|
||||
expect(app.getLocaleCountryCode()).to.be.a('string').and.have.lengthOf(expectedLength);
|
||||
const localeCountryCode = app.getLocaleCountryCode();
|
||||
expect(localeCountryCode).to.be.a('string');
|
||||
expect(localeCountryCode.length).to.be.oneOf([0, 2]);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue