This repository was archived by the owner on Jan 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change 1
1
const fs = require ( "fs" ) ;
2
2
3
- const checkFile = file => {
4
- if ( fs . existsSync ( file ) ) {
5
- console . log ( `Success! \n ${ file } exists!\n` ) ;
6
- } else {
7
- console . log ( `Failure! \n ${ file } does not exist!\n` ) ;
8
- }
9
- } ;
10
-
11
- checkFile ( "snow-leopard" ) ;
12
- checkFile ( "snow-leopard/pages/index.js" ) ;
13
- checkFile ( "snow-leopard/components/code-area.js" ) ;
3
+ describe ( "it checks that the project was create successfully" , ( ) => {
4
+ it ( "checks that the project was initiated" , ( ) => {
5
+ expect ( fs . existsSync ( "snow-leopard/package.json" ) ) . toBe ( true ) ;
6
+ } ) ;
7
+ it ( "checks that the project template was created" , ( ) => {
8
+ expect ( fs . existsSync ( "snow-leopard/components/" ) ) . toBe ( true ) ;
9
+ } ) ;
10
+ it ( "checks that the project template was created" , ( ) => {
11
+ expect ( fs . existsSync ( "snow-leopard/pages/index.js" ) ) . toBe ( true ) ;
12
+ } ) ;
13
+ } ) ;
Original file line number Diff line number Diff line change 7
7
"url" : " https://github.com/alexandercbooth/create-nteract-app.git"
8
8
},
9
9
"scripts" : {
10
- "test" : " node __tests__/index-spec.js "
10
+ "test" : " jest "
11
11
},
12
12
"author" :
" Alexander C. Booth <[email protected] >" ,
13
13
"license" : " MIT" ,
34
34
},
35
35
"devDependencies" : {
36
36
"husky" : " ^1.0.0-rc.13" ,
37
+ "jest" : " ^23.5.0" ,
37
38
"lint-staged" : " ^7.2.0" ,
38
39
"prettier" : " 1.14.2"
39
40
}
You can’t perform that action at this time.
0 commit comments