File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ var affordances = {
3232var orderedListOfCommands = [
3333 'start' ,
3434 'serve' ,
35+ 'generate' ,
3536 'platform' ,
37+ 'prepare' ,
3638 'run' ,
3739 'emulate' ,
3840 'build' ,
@@ -58,6 +60,8 @@ var orderedListOfCommands = [
5860 'link' ,
5961 'hooks' ,
6062 'state' ,
63+ 'address' ,
64+ 'compile' ,
6165 'docs'
6266] ;
6367
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ var fs = require ( 'fs' ) ;
4+ var path = require ( 'path' ) ;
5+ var commands = require ( '../../lib/config/commands' ) ;
6+
7+ describe ( 'orderedListOfCommands' , function ( ) {
8+ var listOfCommands = commands . orderedListOfCommands . slice ( 0 ) ;
9+
10+ it ( 'should have a corresponding command every task in ionic folder' , function ( ) {
11+ var taskFileList = fs
12+ . readdirSync ( path . join ( __dirname , '../../lib/ionic' ) )
13+ . filter ( function ( file ) {
14+ var stat = fs . statSync ( path . join ( __dirname , '../../lib/ionic' , file ) ) ;
15+ return ! stat . isDirectory ( ) ;
16+ } )
17+ . map ( function ( file ) {
18+ return file . replace ( '.js' , '' ) ;
19+ } )
20+ . sort ( ) ;
21+ expect ( taskFileList ) . toEqual ( listOfCommands . sort ( ) ) ;
22+ } ) ;
23+ } ) ;
You can’t perform that action at this time.
0 commit comments