@@ -86,11 +86,10 @@ describe('getDevupDefine', () => {
8686
8787describe ( 'writeDataFiles behavior' , ( ) => {
8888 it ( 'should register theme from devup.json when it exists' , async ( ) => {
89- existsSyncSpy . mockImplementation ( ( path : string ) => path === 'devup.json' )
9089 readFileSpy . mockResolvedValue ( '{"theme": {"colors": {"primary": "#000"}}}' )
9190 getThemeInterfaceSpy . mockReturnValue ( 'interface CustomColors {}' )
9291
93- // Simulate writeDataFiles behavior
92+ // Simulate writeDataFiles behavior without exporting private plugin helpers.
9493 const content = '{"theme": {"colors": {"primary": "#000"}}}'
9594 const parsed = JSON . parse ( content )
9695 registerThemeSpy ( parsed ?. [ 'theme' ] ?? { } )
@@ -101,7 +100,6 @@ describe('writeDataFiles behavior', () => {
101100 } )
102101
103102 it ( 'should write theme.d.ts when interfaceCode is returned' , async ( ) => {
104- existsSyncSpy . mockImplementation ( ( path : string ) => path === 'devup.json' )
105103 getThemeInterfaceSpy . mockReturnValue ( 'interface CustomColors {}' )
106104
107105 const interfaceCode = getThemeInterfaceSpy (
@@ -127,7 +125,7 @@ describe('writeDataFiles behavior', () => {
127125 it ( 'should register empty theme when devup.json does not exist' , async ( ) => {
128126 existsSyncSpy . mockReturnValue ( false )
129127
130- // Simulate the else branch
128+ // Simulate the missing config branch.
131129 const content = undefined
132130 if ( ! content ) {
133131 registerThemeSpy ( { } )
@@ -164,7 +162,7 @@ describe('writeDataFiles behavior', () => {
164162 it ( 'should create css directory when it does not exist' , async ( ) => {
165163 existsSyncSpy . mockReturnValue ( false )
166164
167- // Simulate the Promise.all behavior
165+ // Simulate the directory creation branch without exposing internals.
168166 if ( ! existsSyncSpy ( 'df/devup-ui' ) ) {
169167 await mkdirSpy ( 'df/devup-ui' , { recursive : true } )
170168 }
0 commit comments