@@ -7,11 +7,11 @@ describe('Config', () => {
77 config = new Config ( ) ;
88 } ) ;
99
10- it ( 'should create an instance of Config without existing data' , ( ) => {
10+ it ( 'creates an instance of Config without existing data' , ( ) => {
1111 expect ( config . getModules ( ) ) . toHaveLength ( 0 ) ;
1212 } ) ;
1313
14- it ( 'should add new module' , ( ) => {
14+ it ( 'adds new module' , ( ) => {
1515 const addedModule = config . addModule ( 'a-module' ) ;
1616 const modules = config . getModules ( ) ;
1717
@@ -20,14 +20,14 @@ describe('Config', () => {
2020 expect ( modules [ 0 ] . name ) . toBe ( 'a-module' ) ;
2121 } ) ;
2222
23- it ( 'should return existing module when addModule called twice' , ( ) => {
23+ it ( 'returns existing module when addModule called twice' , ( ) => {
2424 const addedModule1 = config . addModule ( 'a-module' ) ;
2525 const addedModule2 = config . addModule ( 'a-module' ) ;
2626
2727 expect ( addedModule1 ) . toBe ( addedModule2 ) ;
2828 } ) ;
2929
30- it ( 'should map a module to its alias' , ( ) => {
30+ it ( 'maps a module to its alias' , ( ) => {
3131 const addedModule = config . addModule ( 'liferay@1.0.0' ) ;
3232
3333 config . addMappings ( { liferay : 'liferay@1.0.0' } ) ;
@@ -37,7 +37,7 @@ describe('Config', () => {
3737 expect ( mappedModule ) . toBe ( addedModule ) ;
3838 } ) ;
3939
40- it ( 'should respect "exactMatch" mappings' , ( ) => {
40+ it ( 'respects "exactMatch" mappings' , ( ) => {
4141 const addedModule = config . addModule ( 'liferay@1.0.0/index' ) ;
4242
4343 config . addMappings ( {
@@ -56,7 +56,7 @@ describe('Config', () => {
5656 expect ( mappedModule ) . toBe ( addedModule ) ;
5757 } ) ;
5858
59- it ( 'should map an array of modules to their aliases' , ( ) => {
59+ it ( 'maps an array of modules to their aliases' , ( ) => {
6060 const addedModule1 = config . addModule ( 'liferay@1.0.0' ) ;
6161 const addedModule2 = config . addModule ( 'liferay@2.0.0' ) ;
6262
@@ -70,7 +70,7 @@ describe('Config', () => {
7070 expect ( mappedModules ) . toEqual ( [ addedModule1 , addedModule2 ] ) ;
7171 } ) ;
7272
73- it ( 'should map a module via a mapping function' , ( ) => {
73+ it ( 'maps a module via a mapping function' , ( ) => {
7474 const addedModule1 = config . addModule ( 'liferaytest' ) ;
7575 const addedModule2 = config . addModule ( 'liferay2test' ) ;
7676
@@ -83,25 +83,21 @@ describe('Config', () => {
8383 expect ( mappedModules ) . toEqual ( [ addedModule1 , addedModule2 ] ) ;
8484 } ) ;
8585
86- it (
87- 'should ignore a mapping function if a more specific module mapping ' +
88- 'exists' ,
89- ( ) => {
90- const addedModule1 = config . addModule ( 'liferay@1.0.0' ) ;
91- const addedModule2 = config . addModule ( 'liferay2test' ) ;
86+ it ( 'ignores a mapping function if a more specific module mapping exists' , ( ) => {
87+ const addedModule1 = config . addModule ( 'liferay@1.0.0' ) ;
88+ const addedModule2 = config . addModule ( 'liferay2test' ) ;
9289
93- config . addMappings ( {
94- 'liferay' : 'liferay@1.0.0' ,
95- '*' : name => name + 'test' ,
96- } ) ;
90+ config . addMappings ( {
91+ 'liferay' : 'liferay@1.0.0' ,
92+ '*' : name => name + 'test' ,
93+ } ) ;
9794
98- const mappedModules = config . getModules ( [ 'liferay' , 'liferay2' ] ) ;
95+ const mappedModules = config . getModules ( [ 'liferay' , 'liferay2' ] ) ;
9996
100- expect ( mappedModules ) . toEqual ( [ addedModule1 , addedModule2 ] ) ;
101- }
102- ) ;
97+ expect ( mappedModules ) . toEqual ( [ addedModule1 , addedModule2 ] ) ;
98+ } ) ;
10399
104- it ( 'should apply exactMatches first' , ( ) => {
100+ it ( 'applies exactMatches first' , ( ) => {
105101 const addedModule1 = config . addModule ( 'liferay@1.0.0/index' ) ;
106102 const addedModule2 = config . addModule ( 'liferay@2.0.0/main' ) ;
107103 const addedModule3 = config . addModule ( 'liferay@2.0.0' ) ;
@@ -132,7 +128,7 @@ describe('Config', () => {
132128 expect ( mappedModule ) . toBe ( addedModule4 ) ;
133129 } ) ;
134130
135- it ( 'should stop replacement for exact identity matches' , ( ) => {
131+ it ( 'stops replacement for exact identity matches' , ( ) => {
136132 const addedModule = config . addModule ( 'liferay/index' ) ;
137133
138134 config . addMappings ( {
@@ -145,7 +141,7 @@ describe('Config', () => {
145141 expect ( mappedModule ) . toBe ( addedModule ) ;
146142 } ) ;
147143
148- it ( 'should map local modules correctly' , ( ) => {
144+ it ( 'maps local modules correctly' , ( ) => {
149145 const currentModule = config . addModule ( 'isobject@2.1.0/index' ) ;
150146 const dependency1 = config . addModule ( 'isarray@1.0.0' ) ;
151147 const dependency2 = config . addModule ( 'isarray@1.0.0/index' ) ;
0 commit comments