Skip to content

Commit

Permalink
fix: default all modules to enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
thisislawatts committed Dec 16, 2021
1 parent 04249f3 commit db7af5e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/modules/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ describe('getSupportedModules', () => {
it('returns a default set of modules', () => {
process.env.REACT_APP_SUPPORTED_MODULES = ''
expect(getSupportedModules()).toStrictEqual(
[MODULE.CORE]
[
MODULE.CORE,
MODULE.HOWTO,
MODULE.MAP,
MODULE.EVENTS,
MODULE.RESEARCH,
MODULE.ACADEMY,
MODULE.USER,
]
)
});

Expand Down
2 changes: 1 addition & 1 deletion src/modules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export enum MODULE {
}

export function getSupportedModules(): MODULE[] {
const envModules: string[] = getConfigirationOption('REACT_APP_SUPPORTED_MODULES', '').split(',').map(s => s.trim()) || []
const envModules: string[] = getConfigirationOption('REACT_APP_SUPPORTED_MODULES', 'howto,map,events,research,academy,user').split(',').map(s => s.trim()) || []
return [MODULE.CORE]
.concat(
Object.values(MODULE)
Expand Down

0 comments on commit db7af5e

Please sign in to comment.