Skip to content

Commit a75b3f8

Browse files
Add tests for new eslint cache config
1 parent c5a134f commit a75b3f8

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

test/Unit/Task/ESLintTest.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ public static function provideConfigurableOptions(): iterable
3434
// ESLint native config options
3535
'config' => null,
3636
'ignore_path' => null,
37+
'cache' => null,
38+
'cache_location' => null,
3739
'debug' => false,
3840
'format' => null,
3941
'max_warnings' => null,
@@ -146,6 +148,30 @@ public static function provideExternalTaskRuns(): iterable
146148
'hello2.js',
147149
]
148150
];
151+
yield 'cache' => [
152+
[
153+
'cache' => true,
154+
],
155+
self::mockContext(RunContext::class, ['hello.js', 'hello2.js']),
156+
'stylelint',
157+
[
158+
'--cache',
159+
'hello.js',
160+
'hello2.js',
161+
]
162+
];
163+
yield 'cache_location' => [
164+
[
165+
'cache_location' => 'path/to/cache',
166+
],
167+
self::mockContext(RunContext::class, ['hello.js', 'hello2.js']),
168+
'stylelint',
169+
[
170+
'--cache-location=path/to/cache',
171+
'hello.js',
172+
'hello2.js',
173+
]
174+
];
149175
yield 'debug' => [
150176
[
151177
'debug' => true,

0 commit comments

Comments
 (0)