mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-01 04:09:17 +00:00
test: read the fixture basename on either separator
Issue: #247 User-Visible: no
This commit is contained in:
@@ -122,6 +122,19 @@ export const MUTANTS = [
|
||||
replace: ' const span = centre;',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'docs-fixture-splits-posix-only',
|
||||
guard: 'node --test --test-name-pattern="не зависит от разделителя платформы" '
|
||||
+ 'test/docs-accept.test.mjs',
|
||||
because: 'фикстура приёмки разбирала путь только по «/» и на Windows отдавала весь путь '
|
||||
+ 'вместо имени файла: три проверки краснели на верной реализации, а Linux этого не '
|
||||
+ 'видел вовсе — регресс обязан краснеть на любой платформе (#247)',
|
||||
patches: [{
|
||||
file: 'test/docs-accept.test.mjs',
|
||||
find: "export const basename = (path) => String(path).split(/[\\\\/]/).filter(Boolean).pop() ?? '';",
|
||||
replace: "export const basename = (path) => String(path).split('/').pop() ?? '';",
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'docs-accept-takes-any-chromium',
|
||||
guard: 'node --test --test-name-pattern="без названного Chromium" test/docs-accept.test.mjs',
|
||||
|
||||
Reference in New Issue
Block a user