File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,16 +7,23 @@ vi.hoisted(() => {
77 vi . stubEnv ( 'NEXT_PUBLIC_APP_URL' , 'https://self-hosted.example' )
88 vi . stubEnv ( 'NEXT_PUBLIC_FORCE_HOSTED' , 'true' )
99 vi . stubEnv ( 'NODE_ENV' , 'production' )
10+ vi . stubEnv ( 'MSHIP_PLAN_MODE' , 'true' )
1011} )
1112
1213vi . unmock ( '@/lib/core/config/env' )
1314vi . unmock ( '@/lib/core/config/env-flags' )
1415
15- import { isHosted , isProd } from '@/lib/core/config/env-flags'
16+ import { isHosted , isPlanModeEnabled , isProd } from '@/lib/core/config/env-flags'
1617
1718describe ( 'hosted detection' , ( ) => {
1819 it ( 'follows the configured URL and ignores the development override in production' , ( ) => {
1920 expect ( isProd ) . toBe ( true )
2021 expect ( isHosted ) . toBe ( false )
2122 } )
2223} )
24+
25+ describe ( 'Plan mode deployment flag' , ( ) => {
26+ it ( 'normalizes the runtime string to the boolean required by mode selectors' , ( ) => {
27+ expect ( isPlanModeEnabled ) . toBe ( true )
28+ } )
29+ } )
Original file line number Diff line number Diff line change @@ -729,4 +729,5 @@ export const isLiveEnterpriseSearchEnabled =
729729
730730/** Private organizational planning, enabled only by this deployment. */
731731export const isPlanModeEnabled =
732- typeof window === 'undefined' && ( env . MSHIP_PLAN_MODE ?? process . env . NODE_ENV === 'development' )
732+ typeof window === 'undefined' &&
733+ ( envBoolean ( env . MSHIP_PLAN_MODE ) ?? process . env . NODE_ENV === 'development' )
You can’t perform that action at this time.
0 commit comments