@@ -47,7 +47,7 @@ static void beforeAll(@TempDir File pertainingCacheDir) {
47
47
}
48
48
49
49
@ Test
50
- void prettierWithDefaultInstallCacheTest () throws IOException {
50
+ void prettierCachesNodeModulesToADefaultFolderWhenCachingEnabled () throws IOException {
51
51
File dir1 = newFolder ("npm-prettier-1" );
52
52
File cacheDir = DEFAULT_DIR_FOR_NPM_INSTALL_CACHE_DO_NEVER_WRITE_TO_THIS ;
53
53
BuildResult result = runPhpPrettierOnDir (dir1 , cacheDir );
@@ -59,7 +59,7 @@ void prettierWithDefaultInstallCacheTest() throws IOException {
59
59
}
60
60
61
61
@ Test
62
- void prettierWithSpecificInstallCacheTest () throws IOException {
62
+ void prettierCachesAndReusesNodeModulesInSpecificInstallCacheFolder () throws IOException {
63
63
File dir1 = newFolder ("npm-prettier-1" );
64
64
File cacheDir = newFolder ("npm-prettier-cache" );
65
65
BuildResult result = runPhpPrettierOnDir (dir1 , cacheDir );
@@ -70,18 +70,17 @@ void prettierWithSpecificInstallCacheTest() throws IOException {
70
70
}
71
71
72
72
@ Test
73
- void prettierWithNoCacheTest () throws IOException {
73
+ void prettierDoesNotCacheNodeModulesIfNotExplicitlyEnabled () throws IOException {
74
74
File dir2 = newFolder ("npm-prettier-1" );
75
- File cacheDir = null ;
76
- BuildResult result = runPhpPrettierOnDir (dir2 , cacheDir );
75
+ BuildResult result = runPhpPrettierOnDir (dir2 , null );
77
76
Assertions .assertThat (result .getOutput ())
78
77
.doesNotContainPattern ("Using cached node_modules for .*" )
79
78
.doesNotContainPattern ("Caching node_modules for .*" );
80
79
}
81
80
82
81
@ Test
83
82
@ Order (1 )
84
- void prettierWithSpecificGlobalInstallCacheTest () throws IOException {
83
+ void prettierCachesNodeModuleInGlobalInstallCacheDir () throws IOException {
85
84
File dir1 = newFolder ("npm-prettier-global-1" );
86
85
File cacheDir = pertainingCacheDir ;
87
86
BuildResult result = runPhpPrettierOnDir (dir1 , cacheDir );
@@ -92,7 +91,7 @@ void prettierWithSpecificGlobalInstallCacheTest() throws IOException {
92
91
93
92
@ Test
94
93
@ Order (2 )
95
- void prettierWithSpecificGlobalInstallCacheTest2 () throws IOException {
94
+ void prettierUsesCachedNodeModulesFromGlobalInstallCacheDir () throws IOException {
96
95
File dir2 = newFolder ("npm-prettier-global-2" );
97
96
File cacheDir = pertainingCacheDir ;
98
97
BuildResult result = runPhpPrettierOnDir (dir2 , cacheDir );
@@ -130,7 +129,7 @@ private BuildResult runPhpPrettierOnDir(File projDir, File cacheDir) throws IOEx
130
129
131
130
@ Test
132
131
@ Order (3 )
133
- void tsfmtWithSpecificGlobalInstallCacheTest () throws IOException {
132
+ void tsfmtCachesNodeModuleInGlobalInstallCacheDir () throws IOException {
134
133
File dir1 = newFolder ("npm-tsfmt-global-1" );
135
134
File cacheDir = pertainingCacheDir ;
136
135
BuildResult result = runTsfmtOnDir (dir1 , cacheDir );
@@ -141,7 +140,7 @@ void tsfmtWithSpecificGlobalInstallCacheTest() throws IOException {
141
140
142
141
@ Test
143
142
@ Order (4 )
144
- void tsfmtWithSpecificGlobalInstallCacheTest2 () throws IOException {
143
+ void tsfmtUsesCachedNodeModulesFromGlobalInstallCacheDir () throws IOException {
145
144
File dir2 = newFolder ("npm-tsfmt-global-2" );
146
145
File cacheDir = pertainingCacheDir ;
147
146
BuildResult result = runTsfmtOnDir (dir2 , cacheDir );
@@ -151,10 +150,9 @@ void tsfmtWithSpecificGlobalInstallCacheTest2() throws IOException {
151
150
}
152
151
153
152
@ Test
154
- void tsfmtWithNoCacheTest () throws IOException {
153
+ void tsfmtDoesNotCacheNodeModulesIfNotExplicitlyEnabled () throws IOException {
155
154
File dir2 = newFolder ("npm-tsfmt-1" );
156
- File cacheDir = null ;
157
- BuildResult result = runTsfmtOnDir (dir2 , cacheDir );
155
+ BuildResult result = runTsfmtOnDir (dir2 , null );
158
156
Assertions .assertThat (result .getOutput ())
159
157
.doesNotContainPattern ("Using cached node_modules for .*" )
160
158
.doesNotContainPattern ("Caching node_modules for .*" );
@@ -185,7 +183,7 @@ private BuildResult runTsfmtOnDir(File projDir, File cacheDir) throws IOExceptio
185
183
186
184
@ Test
187
185
@ Order (5 )
188
- void eslintWithSpecificGlobalInstallCacheTest () throws IOException {
186
+ void eslintCachesNodeModuleInGlobalInstallCacheDir () throws IOException {
189
187
File dir1 = newFolder ("npm-eslint-global-1" );
190
188
File cacheDir = pertainingCacheDir ;
191
189
BuildResult result = runEslintOnDir (dir1 , cacheDir );
@@ -196,7 +194,7 @@ void eslintWithSpecificGlobalInstallCacheTest() throws IOException {
196
194
197
195
@ Test
198
196
@ Order (6 )
199
- void eslintWithSpecificGlobalInstallCacheTest2 () throws IOException {
197
+ void eslintUsesCachedNodeModulesFromGlobalInstallCacheDir () throws IOException {
200
198
File dir2 = newFolder ("npm-eslint-global-2" );
201
199
File cacheDir = pertainingCacheDir ;
202
200
BuildResult result = runEslintOnDir (dir2 , cacheDir );
@@ -206,7 +204,7 @@ void eslintWithSpecificGlobalInstallCacheTest2() throws IOException {
206
204
}
207
205
208
206
@ Test
209
- void eslintWithNoCacheTest () throws IOException {
207
+ void eslintDoesNotCacheNodeModulesIfNotExplicitlyEnabled () throws IOException {
210
208
File dir2 = newFolder ("npm-eslint-1" );
211
209
File cacheDir = null ;
212
210
BuildResult result = runEslintOnDir (dir2 , cacheDir );
0 commit comments