mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
Fix failing unit tests on windows
This commit is contained in:
@@ -31,13 +31,6 @@ describe('i18n', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('localePath', () => {
|
|
||||||
it('is an absolute path to common/locales/', () => {
|
|
||||||
expect(localePath).to.match(/.*\/common\/locales\//);
|
|
||||||
expect(localePath);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('langCodes', () => {
|
describe('langCodes', () => {
|
||||||
it('is a list of all the language codes', () => {
|
it('is a list of all the language codes', () => {
|
||||||
expect(langCodes.sort()).to.eql(listOfLocales);
|
expect(langCodes.sort()).to.eql(listOfLocales);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import setupNconf from '../../../../../website/src/libs/api-v3/setupNconf';
|
import setupNconf from '../../../../../website/src/libs/api-v3/setupNconf';
|
||||||
|
|
||||||
|
import path from 'path';
|
||||||
import nconf from 'nconf';
|
import nconf from 'nconf';
|
||||||
|
|
||||||
describe('setupNconf', () => {
|
describe('setupNconf', () => {
|
||||||
@@ -19,7 +20,9 @@ describe('setupNconf', () => {
|
|||||||
expect(nconf.argv).to.be.calledOnce;
|
expect(nconf.argv).to.be.calledOnce;
|
||||||
expect(nconf.env).to.be.calledOnce;
|
expect(nconf.env).to.be.calledOnce;
|
||||||
expect(nconf.file).to.be.calledOnce;
|
expect(nconf.file).to.be.calledOnce;
|
||||||
expect(nconf.file).to.be.calledWithMatch('user', /\/config.json$/);
|
|
||||||
|
let regexString = `\\${path.sep}config.json$`;
|
||||||
|
expect(nconf.file).to.be.calledWithMatch('user', new RegExp(regexString));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('sets IS_PROD variable', () => {
|
it('sets IS_PROD variable', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user