File tree 1 file changed +18
-1
lines changed
1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 1
- const { getPackageJson } = require ( "./utils" ) ;
1
+ const { getPackageJson, isModuleInstalled , doesNotThrow } = require ( "./utils" ) ;
2
2
const assert = require ( "assert" ) ;
3
3
4
4
describe ( "package.json" , ( ) => {
@@ -54,4 +54,21 @@ describe("package.json", () => {
54
54
'should have a "version" value that is a string'
55
55
) ;
56
56
} ) ;
57
+ // 2.1
58
+ it ( 'should have "dependencies"' , ( ) => {
59
+ assert . ok ( json . dependencies , '"dependencies" is missing' ) ;
60
+ assert . equal (
61
+ typeof json . dependencies ,
62
+ "object" ,
63
+ 'should have a "dependencies" value that is an object'
64
+ ) ;
65
+ } ) ;
66
+ it ( 'should have installed "moment"' , async ( ) => {
67
+ assert . ok (
68
+ await doesNotThrow (
69
+ ( ) => isModuleInstalled ( { name : "moment" , type : "dependency" } ) ,
70
+ '"moment" not installed'
71
+ )
72
+ ) ;
73
+ } ) ;
57
74
} ) ;
You can’t perform that action at this time.
0 commit comments