Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Не работают тесты, если в пути есть скобки #439

Open
shishkin17 opened this issue Aug 29, 2019 · 2 comments
Assignees

Comments

@shishkin17
Copy link

В таком случае выводит нули:
Total: 0 Passed: 0 Failed: 0 Skipped: 0 Retries: 0

Причем совершенно не важно, что написано в тесте - он просто не выполняется.
Замечено на маке.

@j0tunn
Copy link
Contributor

j0tunn commented Aug 30, 2019

#409 (comment)

@sipayRT
Copy link
Member

sipayRT commented Mar 15, 2023

Проблема в том, что если в пути есть скобки, то их нужно экранировать. Если этого не делать, то пакет fast-glob такой путь не найдет

Пример для воспроизведения (на файловой системе лежит файл 'tests(1)/example.hermione.js',):

const fg = require('fast-glob');

const result1 = await fg('tests(1)/example.hermione.js', {onlyFiles: false});      // получаем []
const result2 = await fg('tests\\(1\\)/example.hermione.js', {onlyFiles: false}); // получаем [ 'tests(1)/example.hermione.js' ]

Чтобы такого не происходило, нам нужно использовать метод escapePath

ps: нужно еще не забыть, что в сетах мы используем micromatch, который тоже не понимает скобки

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants