-
Notifications
You must be signed in to change notification settings - Fork 595
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
Fix findTestModule
on Mocha Test
#2027
Conversation
Thank you! |
Actually, for readability, I suggest that you go back to using regex literals. You don't need the RegExp constructor. You can still have an if statement that assigns one of two regexes:
|
Also please run "npx eslint ." and fix any coding standards issues, something is complaining in the CI build (: |
(Tip: npx eslint . --fix fixes most of them for you) |
Sure, I'll do that 👌 |
Hi @boutell , I push the latest fixes for you. |
Wait, it seems to be not resolved since other regex taking place on |
…r fs.symlinkSync that uses type of 'junction' that are based on Permission Issue on Windows 10
Done. I think this is a major fix whereby Windows 10 produce more WTF behavior. Especially on permissions issue , I need to change the fs.symlink can’t create directory symlinks on Windows Also using |
It also needs to have attention when using Windows 10 for a unit test. The only thing that WORKS on Windows OS is to have
I believe this should start documented on HOWTO section on creating our own unit tests based on the OS platform. I am dreaming about making a HOWTO guideline on creating this unit tests for everyone's sake. This is a "Yahoooooo !" experience for me that it is finally working on Windows Platform that turns WTF behavior into an AWESOME experience. What do you think @boutell ? |
Unless I miss my guess |
|
You could log to see if I'm wrong and path.sep is a thing at that point,
but if it's not yeah, require("path").sep will work fine.
…On Sun, Sep 15, 2019 at 1:47 PM Amin Shazrin ***@***.***> wrote:
path.sep is actually a separator for file path. If POSIX, uses / ,
otherwise Windows uses \ . I thought using this path.sep will solve both
platform or else, we could just use if else for that separator string.
Anyway, path orginally defined on that file id I'm not mistaken. If not,
I could use require("path").sep directly. Should I do it directly ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2027?email_source=notifications&email_token=AAAH27OBDYPUAVSXJGMOL5TQJZYMHA5CNFSM4IWP4UHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XVSGI#issuecomment-531585305>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAH27KBLKTAGREUCFMLJU3QJZYMHANCNFSM4IWP4UHA>
.
--
Chief Software Architect
Apostrophe Technologies
Pronouns: he / him / his
|
Done. I decided to use it directly to avoid incoming future bugs. |
Thanks! |
The issue on
findTestModule
is resolved by using a different type of regex :.match()
regex appears to must-have/\\\\file\\\\to\\\\path/g
double backward slash that is equal to\\file\\to\\path
.I hope this issue will raise to any file path matching using regex should follow the same format as above stated.