@@ -85,34 +85,32 @@ describe("Simple Git Hooks tests", () => {
85
85
} ) ;
86
86
87
87
describe ( "checkSimpleGitHooksInDependencies" , ( ) => {
88
- const correctPackageJsonProjectPath = path . normalize (
89
- path . join ( process . cwd ( ) , "_tests" , "project_with_simple_pre_commit_in_deps " )
88
+ const PROJECT_WITH_SIMPLE_GIT_HOOKS_IN_DEPS = path . normalize (
89
+ path . join ( process . cwd ( ) , "_tests" , "project_with_simple_git_hooks_in_deps " )
90
90
) ;
91
- const correctPackageJsonProjectPath_2 = path . normalize (
91
+ const PROJECT_WITH_SIMPLE_GIT_HOOKS_IN_DEV_DEPS = path . normalize (
92
92
path . join (
93
- process . cwd ( ) ,
94
- "_tests" ,
95
- "project_with_simple_pre_commit_in_dev_deps"
93
+ process . cwd ( ) , "_tests" , "project_with_simple_git_hooks_in_dev_deps"
96
94
)
97
95
) ;
98
- const incorrectPackageJsonProjectPath = path . normalize (
99
- path . join ( process . cwd ( ) , "_tests" , "project_without_simple_pre_commit " )
96
+ const PROJECT_WITHOUT_SIMPLE_GIT_HOOKS = path . normalize (
97
+ path . join ( process . cwd ( ) , "_tests" , "project_without_simple_git_hooks " )
100
98
) ;
101
- it ( "returns true if simple pre commit really in devDeps " , ( ) => {
99
+ it ( "returns true if simple-git-hooks really in deps " , ( ) => {
102
100
expect (
103
- simpleGitHooks . checkSimpleGitHooksInDependencies ( correctPackageJsonProjectPath )
101
+ simpleGitHooks . checkSimpleGitHooksInDependencies ( PROJECT_WITH_SIMPLE_GIT_HOOKS_IN_DEPS )
104
102
) . toBe ( true ) ;
105
103
} ) ;
106
104
107
- it ( "returns true if simple pre commit really in deps " , ( ) => {
105
+ it ( "returns true if simple-git-hooks really in devDeps " , ( ) => {
108
106
expect (
109
- simpleGitHooks . checkSimpleGitHooksInDependencies ( correctPackageJsonProjectPath_2 )
107
+ simpleGitHooks . checkSimpleGitHooksInDependencies ( PROJECT_WITH_SIMPLE_GIT_HOOKS_IN_DEV_DEPS )
110
108
) . toBe ( true ) ;
111
109
} ) ;
112
110
113
- it ( "returns false if simple pre commit isn`t in deps" , ( ) => {
111
+ it ( "returns false if simple-git-hooks isn`t in deps" , ( ) => {
114
112
expect (
115
- simpleGitHooks . checkSimpleGitHooksInDependencies ( incorrectPackageJsonProjectPath )
113
+ simpleGitHooks . checkSimpleGitHooksInDependencies ( PROJECT_WITHOUT_SIMPLE_GIT_HOOKS )
116
114
) . toBe ( false ) ;
117
115
} ) ;
118
116
} ) ;
0 commit comments