@@ -1813,87 +1813,90 @@ async function runTests() {
18131813 // ============================================================
18141814 console . log ( `${ colors . yellow } Test Suite 31: Mistral Vibe CLI Native Skills${ colors . reset } \n` ) ;
18151815
1816- let tempProjectDir31 ;
1817- let installedBmadDir31 ;
1816+ let tempProjectDirMistral ;
1817+ let installedBmadDirMistral ;
18181818 try {
18191819 clearCache ( ) ;
1820- const platformCodes31 = await loadPlatformCodes ( ) ;
1821- const mistralInstaller = platformCodes31 . platforms . mistral ?. installer ;
1820+ const platformCodesMistral = await loadPlatformCodes ( ) ;
1821+ const mistralInstaller = platformCodesMistral . platforms . mistral ?. installer ;
18221822
18231823 assert ( mistralInstaller ?. target_dir === '.vibe/skills' , 'Mistral Vibe target_dir uses native skills path' ) ;
18241824 assert ( mistralInstaller ?. skill_format === true , 'Mistral Vibe installer enables native skill output' ) ;
18251825 assert ( mistralInstaller ?. template_type === 'default' , 'Mistral Vibe installer uses default skill template' ) ;
18261826 assert ( mistralInstaller ?. legacy_targets === undefined , 'Mistral Vibe installer has no legacy_targets' ) ;
18271827
1828- tempProjectDir31 = await fs . mkdtemp ( path . join ( os . tmpdir ( ) , 'bmad-mistral-test-' ) ) ;
1829- installedBmadDir31 = await createTestBmadFixture ( ) ;
1828+ tempProjectDirMistral = await fs . mkdtemp ( path . join ( os . tmpdir ( ) , 'bmad-mistral-test-' ) ) ;
1829+ installedBmadDirMistral = await createTestBmadFixture ( ) ;
18301830
1831- const ideManager31 = new IdeManager ( ) ;
1832- await ideManager31 . ensureInitialized ( ) ;
1831+ const ideManagerMistral = new IdeManager ( ) ;
1832+ await ideManagerMistral . ensureInitialized ( ) ;
18331833
18341834 // Verify Mistral Vibe is selectable in an available IDEs list
1835- const availableIdes31 = ideManager31 . getAvailableIdes ( ) ;
1835+ const availableIdesMistral = ideManagerMistral . getAvailableIdes ( ) ;
18361836 assert (
1837- availableIdes31 . some ( ( ide ) => ide . value === 'mistral' ) ,
1837+ availableIdesMistral . some ( ( ide ) => ide . value === 'mistral' ) ,
18381838 'Mistral Vibe appears in available IDEs list' ,
18391839 ) ;
18401840
18411841 // Verify Mistral Vibe is NOT detected before install
1842- const detectedBefore31 = await ideManager31 . detectInstalledIdes ( tempProjectDir31 ) ;
1843- assert ( ! detectedBefore31 . includes ( 'mistral' ) , 'Mistral Vibe is not detected before install' ) ;
1842+ const detectedBeforeMistral = await ideManagerMistral . detectInstalledIdes ( tempProjectDirMistral ) ;
1843+ assert ( ! detectedBeforeMistral . includes ( 'mistral' ) , 'Mistral Vibe is not detected before install' ) ;
18441844
1845- const result31 = await ideManager31 . setup ( 'mistral' , tempProjectDir31 , installedBmadDir31 , {
1845+ const resultMistral = await ideManagerMistral . setup ( 'mistral' , tempProjectDirMistral , installedBmadDirMistral , {
18461846 silent : true ,
18471847 selectedModules : [ 'bmm' ] ,
18481848 } ) ;
18491849
1850- assert ( result31 . success === true , 'Mistral Vibe setup succeeds against temp project' ) ;
1850+ assert ( resultMistral . success === true , 'Mistral Vibe setup succeeds against temp project' ) ;
18511851
18521852 // Verify Mistral Vibe IS detected after install
1853- const detectedAfter31 = await ideManager31 . detectInstalledIdes ( tempProjectDir31 ) ;
1854- assert ( detectedAfter31 . includes ( 'mistral' ) , 'Mistral Vibe is detected after install' ) ;
1853+ const detectedAfterMistral = await ideManagerMistral . detectInstalledIdes ( tempProjectDirMistral ) ;
1854+ assert ( detectedAfterMistral . includes ( 'mistral' ) , 'Mistral Vibe is detected after install' ) ;
18551855
1856- const skillFile31 = path . join ( tempProjectDir31 , '.vibe' , 'skills' , 'bmad-master' , 'SKILL.md' ) ;
1857- assert ( await fs . pathExists ( skillFile31 ) , 'Mistral Vibe install writes SKILL.md directory output' ) ;
1856+ const skillFileMistral = path . join ( tempProjectDirMistral , '.vibe' , 'skills' , 'bmad-master' , 'SKILL.md' ) ;
1857+ assert ( await fs . pathExists ( skillFileMistral ) , 'Mistral Vibe install writes SKILL.md directory output' ) ;
18581858
18591859 // Parse YAML frontmatter between --- markers
1860- const skillContent31 = await fs . readFile ( skillFile31 , 'utf8' ) ;
1861- const fmMatch31 = skillContent31 . match ( / ^ - - - \n ( [ \s \S ] * ?) \n - - - \n ? ( [ \s \S ] * ) $ / ) ;
1862- assert ( fmMatch31 , 'Mistral Vibe SKILL.md contains valid frontmatter delimiters' ) ;
1860+ const skillContentMistral = await fs . readFile ( skillFileMistral , 'utf8' ) ;
1861+ const fmMatchMistral = skillContentMistral . match ( / ^ - - - \n ( [ \s \S ] * ?) \n - - - \n ? ( [ \s \S ] * ) $ / ) ;
1862+ assert ( fmMatchMistral , 'Mistral Vibe SKILL.md contains valid frontmatter delimiters' ) ;
18631863
1864- const frontmatter31 = fmMatch31 [ 1 ] ;
1865- const body31 = fmMatch31 [ 2 ] ;
1864+ const frontmatterMistral = fmMatchMistral [ 1 ] ;
1865+ const bodyMistral = fmMatchMistral [ 2 ] ;
18661866
18671867 // Verify the name in the frontmatter matches the directory name
1868- const fmName31 = frontmatter31 . match ( / ^ n a m e : \s * ( .+ ) $ / m) ;
1869- assert ( fmName31 && fmName31 [ 1 ] . trim ( ) === 'bmad-master' , 'Mistral Vibe skill name frontmatter matches directory name exactly' ) ;
1868+ const fmNameMistral = frontmatterMistral . match ( / ^ n a m e : \s * ( .+ ) $ / m) ;
1869+ assert (
1870+ fmNameMistral && fmNameMistral [ 1 ] . trim ( ) === 'bmad-master' ,
1871+ 'Mistral Vibe skill name frontmatter matches directory name exactly' ,
1872+ ) ;
18701873
18711874 // Verify description exists and is non-empty
1872- const fmDesc31 = frontmatter31 . match ( / ^ d e s c r i p t i o n : \s * ( .+ ) $ / m) ;
1873- assert ( fmDesc31 && fmDesc31 [ 1 ] . trim ( ) . length > 0 , 'Mistral Vibe skill description frontmatter is present and non-empty' ) ;
1875+ const fmDescMistral = frontmatterMistral . match ( / ^ d e s c r i p t i o n : \s * ( .+ ) $ / m) ;
1876+ assert ( fmDescMistral && fmDescMistral [ 1 ] . trim ( ) . length > 0 , 'Mistral Vibe skill description frontmatter is present and non-empty' ) ;
18741877
18751878 // Verify frontmatter contains only name and description keys
1876- const fmKeys31 = [ ...frontmatter31 . matchAll ( / ^ ( [ a - z A - Z 0 - 9 _ - ] + ) : / gm) ] . map ( ( m ) => m [ 1 ] ) ;
1879+ const fmKeysMistral = [ ...frontmatterMistral . matchAll ( / ^ ( [ a - z A - Z 0 - 9 _ - ] + ) : / gm) ] . map ( ( m ) => m [ 1 ] ) ;
18771880 assert (
1878- fmKeys31 . length === 2 && fmKeys31 . includes ( 'name' ) && fmKeys31 . includes ( 'description' ) ,
1881+ fmKeysMistral . length === 2 && fmKeysMistral . includes ( 'name' ) && fmKeysMistral . includes ( 'description' ) ,
18791882 'Mistral Vibe skill frontmatter contains only name and description keys' ,
18801883 ) ;
18811884
18821885 // Verify body content is non-empty
1883- assert ( body31 . trim ( ) . length > 0 , 'Mistral Vibe skill body content is non-empty' ) ;
1886+ assert ( bodyMistral . trim ( ) . length > 0 , 'Mistral Vibe skill body content is non-empty' ) ;
18841887
18851888 // Reinstall/upgrade: run setup again over existing output
1886- const result31b = await ideManager31 . setup ( 'mistral' , tempProjectDir31 , installedBmadDir31 , {
1889+ const resultMistralb = await ideManagerMistral . setup ( 'mistral' , tempProjectDirMistral , installedBmadDirMistral , {
18871890 silent : true ,
18881891 selectedModules : [ 'bmm' ] ,
18891892 } ) ;
1890- assert ( result31b . success === true , 'Mistral Vibe reinstall/upgrade succeeds over existing skills' ) ;
1891- assert ( await fs . pathExists ( skillFile31 ) , 'Mistral Vibe reinstall preserves SKILL.md output' ) ;
1893+ assert ( resultMistralb . success === true , 'Mistral Vibe reinstall/upgrade succeeds over existing skills' ) ;
1894+ assert ( await fs . pathExists ( skillFileMistral ) , 'Mistral Vibe reinstall preserves SKILL.md output' ) ;
18921895 } catch ( error ) {
18931896 assert ( false , 'Mistral Vibe native skills test succeeds' , error . message ) ;
18941897 } finally {
1895- if ( tempProjectDir31 ) await fs . remove ( tempProjectDir31 ) . catch ( ( ) => { } ) ;
1896- if ( installedBmadDir31 ) await fs . remove ( installedBmadDir31 ) . catch ( ( ) => { } ) ;
1898+ if ( tempProjectDirMistral ) await fs . remove ( tempProjectDirMistral ) . catch ( ( ) => { } ) ;
1899+ if ( installedBmadDirMistral ) await fs . remove ( installedBmadDirMistral ) . catch ( ( ) => { } ) ;
18971900 }
18981901
18991902 console . log ( '' ) ;
0 commit comments