File tree Expand file tree Collapse file tree 2 files changed +16
-29
lines changed
dev/tests/js/jasmine/spec_runner Expand file tree Collapse file tree 2 files changed +16
-29
lines changed Original file line number Diff line number Diff line change @@ -13,38 +13,14 @@ function init(grunt, options) {
13
13
stripJsonComments = require ( 'strip-json-comments' ) ,
14
14
path = require ( 'path' ) ,
15
15
config ,
16
- themes ;
17
-
16
+ themes ,
17
+ file ;
18
+
18
19
config = grunt . file . read ( __dirname + '/settings.json' ) ;
19
20
config = stripJsonComments ( config ) ;
20
21
config = JSON . parse ( config ) ;
21
22
22
- //themes = require(path.resolve(process.cwd(), config.themes));
23
- //TODO: MAGETWO-39843
24
- themes = {
25
- blank : {
26
- area : 'frontend' ,
27
- name : 'Magento/blank' ,
28
- locale : 'en_US' ,
29
- files : [
30
- 'css/styles-m' ,
31
- 'css/styles-l' ,
32
- 'css/email' ,
33
- 'css/email-inline'
34
- ] ,
35
- dsl : 'less'
36
- } ,
37
- backend : {
38
- area : 'adminhtml' ,
39
- name : 'Magento/backend' ,
40
- locale : 'en_US' ,
41
- files : [
42
- 'css/styles-old' ,
43
- 'css/styles'
44
- ] ,
45
- dsl : 'less'
46
- }
47
- }
23
+ themes = require ( path . resolve ( process . cwd ( ) , config . themes ) ) ;
48
24
49
25
if ( options . theme ) {
50
26
themes = _ . pick ( themes , options . theme ) ;
@@ -54,6 +30,12 @@ function init(grunt, options) {
54
30
55
31
config . themes = themes ;
56
32
33
+ file = grunt . option ( 'file' ) ;
34
+
35
+ if ( file ) {
36
+ config . singleTest = file ;
37
+ }
38
+
57
39
enableTasks ( grunt , config ) ;
58
40
}
59
41
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ function init(config) {
16
16
root = config . root ;
17
17
port = config . port ;
18
18
files = config . files ;
19
- host = _ . template ( config . host ) ( { port : port } ) ;
20
19
themes = config . themes ;
21
20
22
21
_ . each ( themes , function ( themeData , themeName ) {
@@ -26,7 +25,13 @@ function init(config) {
26
25
27
26
_ . extend ( themeData , { root : root } ) ;
28
27
28
+ host = _ . template ( config . host ) ( { port : port ++ } ) ;
29
29
render = renderTemplate . bind ( null , themeData ) ;
30
+
31
+ if ( config . singleTest ) {
32
+ files . specs = [ config . singleTest ] ;
33
+ }
34
+
30
35
specs = files . specs . map ( render ) ;
31
36
specs = expand ( specs ) . map ( cutJsExtension ) ;
32
37
configs = files . requirejsConfigs . map ( render ) ;
You can’t perform that action at this time.
0 commit comments