@@ -17,14 +17,14 @@ describe('Cross-Platform Test Helpers', () => {
1717 describe ( 'getPlatformInfo' , ( ) => {
1818 test ( 'should return valid platform information' , ( ) => {
1919 const info = getPlatformInfo ( ) ;
20-
20+
2121 expect ( typeof info . isWindows ) . toBe ( 'boolean' ) ;
2222 expect ( typeof info . isMacOS ) . toBe ( 'boolean' ) ;
2323 expect ( typeof info . isLinux ) . toBe ( 'boolean' ) ;
2424 expect ( typeof info . pathSeparator ) . toBe ( 'string' ) ;
2525 expect ( typeof info . caseSensitive ) . toBe ( 'boolean' ) ;
2626 expect ( typeof info . supportsSymlinks ) . toBe ( 'boolean' ) ;
27-
27+
2828 // Exactly one platform should be true
2929 const platformCount = [ info . isWindows , info . isMacOS , info . isLinux ] . filter ( Boolean ) . length ;
3030 expect ( platformCount ) . toBe ( 1 ) ;
@@ -33,7 +33,7 @@ describe('Cross-Platform Test Helpers', () => {
3333 test ( 'should correctly identify current platform' , ( ) => {
3434 const info = getPlatformInfo ( ) ;
3535 const currentPlatform = platform ( ) ;
36-
36+
3737 switch ( currentPlatform ) {
3838 case 'win32' :
3939 expect ( info . isWindows ) . toBe ( true ) ;
@@ -58,7 +58,7 @@ describe('Cross-Platform Test Helpers', () => {
5858 test ( 'should normalize paths correctly' , ( ) => {
5959 const testPath = 'folder/../subfolder/./file.txt' ;
6060 const normalized = normalizePath ( testPath ) ;
61-
61+
6262 expect ( normalized ) . toMatch ( / s u b f o l d e r / ) ;
6363 expect ( normalized ) . not . toMatch ( / \. \. / ) ;
6464 expect ( normalized ) . not . toMatch ( / \. \/ / ) ;
@@ -69,7 +69,7 @@ describe('Cross-Platform Test Helpers', () => {
6969 test ( 'should create paths with correct separators' , ( ) => {
7070 const path = createPath ( 'folder' , 'subfolder' , 'file.txt' ) ;
7171 const info = getPlatformInfo ( ) ;
72-
72+
7373 if ( info . isWindows ) {
7474 expect ( path ) . toMatch ( / f o l d e r \\ s u b f o l d e r \\ f i l e \. t x t / ) ;
7575 } else {
@@ -81,7 +81,7 @@ describe('Cross-Platform Test Helpers', () => {
8181 describe ( 'convertPathSeparators' , ( ) => {
8282 test ( 'should convert path separators for current platform' , ( ) => {
8383 const info = getPlatformInfo ( ) ;
84-
84+
8585 if ( info . isWindows ) {
8686 const converted = convertPathSeparators ( 'folder/subfolder/file.txt' ) ;
8787 expect ( converted ) . toBe ( 'folder\\subfolder\\file.txt' ) ;
@@ -95,10 +95,10 @@ describe('Cross-Platform Test Helpers', () => {
9595 describe ( 'wouldFilenamesConflict' , ( ) => {
9696 test ( 'should detect filename conflicts based on case sensitivity' , ( ) => {
9797 const info = getPlatformInfo ( ) ;
98-
98+
9999 // Same case should always conflict
100100 expect ( wouldFilenamesConflict ( 'file.txt' , 'file.txt' ) ) . toBe ( true ) ;
101-
101+
102102 // Different case behavior depends on filesystem
103103 const differentCaseConflict = wouldFilenamesConflict ( 'file.txt' , 'FILE.TXT' ) ;
104104 if ( info . caseSensitive ) {
@@ -113,7 +113,7 @@ describe('Cross-Platform Test Helpers', () => {
113113 test ( 'should return boolean for supported features' , ( ) => {
114114 const symlinkSkip = skipIfUnsupported ( 'symlinks' ) ;
115115 const caseSkip = skipIfUnsupported ( 'case-sensitivity' ) ;
116-
116+
117117 expect ( typeof symlinkSkip ) . toBe ( 'boolean' ) ;
118118 expect ( typeof caseSkip ) . toBe ( 'boolean' ) ;
119119 } ) ;
@@ -134,26 +134,26 @@ describe('Cross-Platform Test Helpers', () => {
134134 test ( 'should return appropriate test paths for current platform' , ( ) => {
135135 const testPaths = getTestPaths ( ) ;
136136 const info = getPlatformInfo ( ) ;
137-
137+
138138 expect ( testPaths ) . toHaveProperty ( 'absolute' ) ;
139139 expect ( testPaths ) . toHaveProperty ( 'relative' ) ;
140140 expect ( testPaths ) . toHaveProperty ( 'invalid' ) ;
141-
141+
142142 if ( info . isWindows ) {
143143 expect ( testPaths ) . toBe ( PLATFORM_TEST_PATHS . windows ) ;
144144 // Windows paths should contain drive letters
145- expect ( testPaths . absolute . some ( path => path . match ( / ^ [ A - Z ] : \\ / i) ) ) . toBe ( true ) ;
145+ expect ( testPaths . absolute . some ( ( path ) => path . match ( / ^ [ A - Z ] : \\ / i) ) ) . toBe ( true ) ;
146146 } else {
147147 expect ( testPaths ) . toBe ( PLATFORM_TEST_PATHS . unix ) ;
148148 // Unix paths should start with /
149- expect ( testPaths . absolute . every ( path => path . startsWith ( '/' ) ) ) . toBe ( true ) ;
149+ expect ( testPaths . absolute . every ( ( path ) => path . startsWith ( '/' ) ) ) . toBe ( true ) ;
150150 }
151151 } ) ;
152152 } ) ;
153153
154154 // Conditional tests to demonstrate the helper
155155 const conditionalTest = createConditionalTest ( test ) ;
156-
156+
157157 conditionalTest ( 'symlink test' , 'symlinks' , ( ) => {
158158 // This test only runs if symlinks are supported
159159 expect ( true ) . toBe ( true ) ;
@@ -195,16 +195,16 @@ describe('Cross-Platform Test Helpers', () => {
195195 // These tests check if CI environment variables are properly read
196196 const caseSensitiveEnv = process . env . MARKMV_TEST_FILESYSTEM_CASE_SENSITIVE ;
197197 const symlinksEnv = process . env . MARKMV_TEST_SUPPORTS_SYMLINKS ;
198-
198+
199199 if ( caseSensitiveEnv !== undefined ) {
200200 const info = getPlatformInfo ( ) ;
201201 expect ( info . caseSensitive ) . toBe ( caseSensitiveEnv === 'true' ) ;
202202 }
203-
203+
204204 if ( symlinksEnv !== undefined ) {
205205 const info = getPlatformInfo ( ) ;
206206 expect ( info . supportsSymlinks ) . toBe ( symlinksEnv === 'true' ) ;
207207 }
208208 } ) ;
209209 } ) ;
210- } ) ;
210+ } ) ;
0 commit comments