File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { expect } from 'chai' ;
2
2
import 'mocha' ;
3
+ import * as inquirerMock from '../test/inquirer-mock' ;
3
4
import frontvue from './core' ;
4
5
6
+
5
7
describe ( 'Frontvue' , ( ) => {
6
8
it ( 'instantiates' , async ( ) => {
7
9
const instance = await frontvue ;
10
+
11
+ inquirerMock ( {
12
+ fullName : 'John Doe' ,
13
+ useDefault : false ,
14
+ } ) ;
15
+
8
16
expect ( instance ) . to . be . an ( 'object' ) ;
9
- } ) ;
17
+ } ) . timeout ( 12000 ) ;
10
18
} ) ;
Original file line number Diff line number Diff line change 6
6
*/
7
7
8
8
import ConfigManager from './config-manager' ;
9
+ import ConfigWizard from './config-wizard' ;
9
10
import PluginManager from './plugin-manager' ;
10
11
import TaskManager from './task-manager' ;
11
12
import taskInitProject from './tasks/task-init-project' ;
@@ -19,16 +20,17 @@ async function Frontvue() {
19
20
const name = 'frontvue' ;
20
21
const logger = Logger ( name ) ;
21
22
const configManager = await ConfigManager ( name ) ;
23
+ const configWizard = ConfigWizard ( configManager ) ;
22
24
const taskManager = TaskManager ( {
23
25
hooks : [
24
26
'init' ,
25
27
] ,
26
28
} ) ;
27
- const pluginManager = PluginManager ( taskManager ) ;
29
+ const pluginManager = PluginManager ( taskManager , configWizard ) ;
28
30
const { run } = taskManager ;
29
31
30
32
// Use custom plugin
31
- pluginManager . use ( taskInitProject ) ;
33
+ await pluginManager . use ( taskInitProject ) ;
32
34
33
35
// Return public API
34
36
return Object . freeze ( {
You can’t perform that action at this time.
0 commit comments