@@ -10,18 +10,18 @@ const {runSync} = require('../helpers');
1010
1111describe ( 'docs' , ( ) => {
1212 const home = path . resolve ( 'temp/test-docs' ) ;
13- const target = path . resolve ( home , 'target ' ) ;
14- const source = path . resolve ( home , 'src ' ) ;
13+ const parsed = path . resolve ( home , '1-parse ' ) ;
14+ const docs = path . join ( home , 'docs ' ) ;
1515 beforeEach ( ( ) => {
1616 fs . rmSync ( home , { recursive : true , force : true } ) ;
17- fs . mkdirSync ( source , { recursive : true } ) ;
17+ fs . mkdirSync ( parsed , { recursive : true } ) ;
1818 } ) ;
1919 /**
2020 * Tests that the 'docs' command generates HTML files in the docs directory.
2121 * @param {Mocha.Done } done - Mocha callback signaling asynchronous completion
2222 */
2323 it ( 'generates HTML files for files and packages' , ( done ) => {
24- const sample = path . join ( source , 'foo' , 'bar' ) ;
24+ const sample = path . join ( parsed , 'foo' , 'bar' ) ;
2525 fs . mkdirSync ( sample , { recursive : true } ) ;
2626 const xmir1 = path . join ( sample , 'test1.xmir' ) ;
2727 fs . writeFileSync ( xmir1 , '<program name="test" />' ) ;
@@ -30,10 +30,9 @@ describe('docs', () => {
3030 runSync ( [
3131 'docs' ,
3232 '--verbose' ,
33- '-s' , source ,
34- '-t' , target ,
33+ '-s' , path . resolve ( home , 'src' ) ,
34+ '-t' , home ,
3535 ] ) ;
36- const docs = path . join ( target , 'docs' ) ;
3736 assert ( fs . existsSync ( docs ) , 'Expected the docs directory to be created but it is missing' ) ;
3837
3938 const test1_html = path . join ( docs , 'foo/bar/test1.html' ) ;
0 commit comments