File tree Expand file tree Collapse file tree 2 files changed +7
-26
lines changed Expand file tree Collapse file tree 2 files changed +7
-26
lines changed Original file line number Diff line number Diff line change 1
1
import { expect } from 'chai' ;
2
2
import 'mocha' ;
3
- import Greeter from './index' ;
4
3
5
- describe ( 'Greeter' , ( ) => {
6
- it ( 'correctly creates greeter instance' , ( ) => {
7
- const greeter = Greeter ( 'Hola' ) ;
8
- expect ( greeter . hello ( 'John' ) ) . to . equal ( 'Hola, John!' ) ;
9
- } ) ;
10
-
11
- it ( 'throws if instantiated without parameter' , ( ) => {
12
- expect ( ( ) => Greeter ( ) ) . to . throw ( Error ) ;
13
- } ) ;
4
+ describe ( 'Frontvue' , ( ) => {
5
+ it ( 'instantiates' ) ;
14
6
} ) ;
Original file line number Diff line number Diff line change 5
5
* @since 0.1.0
6
6
*/
7
7
8
- interface IGreeting {
9
- hello ( name : string ) : string ;
10
- }
8
+ import ConfigManagerFactory from './config-manager/index' ;
11
9
12
- const GreetingFactory = function ( greeting : string ) : IGreeting {
13
- if ( ! greeting || typeof greeting !== 'string' ) {
14
- throw new Error ( `GreetingFactory requires 1 parameter to be a string, ${ typeof greeting } was passed instead` ) ;
15
- }
16
-
17
- return Object . freeze ( {
18
- hello ( name : string ) : string {
19
- return `${ greeting } , ${ name } !` ;
20
- } ,
21
- } ) ;
22
- } ;
23
-
24
- export default GreetingFactory ;
10
+ ( async function frontvue ( ) {
11
+ const name = 'frontvue' ;
12
+ const configManager = await ConfigManagerFactory ( name ) ;
13
+ } ( ) ) ;
You can’t perform that action at this time.
0 commit comments