The Wayback Machine - https://web.archive.org/web/20201021144110/https://github.com/facebook/docusaurus/issues/3483
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Jest tests cross-platform (fix Jest tests on Windows) #3483

Open
Simek opened this issue Sep 24, 2020 · 9 comments
Open

Make Jest tests cross-platform (fix Jest tests on Windows) #3483

Simek opened this issue Sep 24, 2020 · 9 comments

Comments

@Simek
Copy link
Contributor

@Simek Simek commented Sep 24, 2020

馃挜 Proposal

Make Jest tests cross-platform (fix Jest tests on Windows). The tests are failing mostly because of various paths related issues. I was trying to fix some of them but without a success (using slash and path.normalize).

  • #3481 - this PR adds the test step to the Windows CI

Have you read the [Contributing Guidelines on issues]

Yes

@skr571999
Copy link

@skr571999 skr571999 commented Oct 1, 2020

Hey @slorber

Can I work on the Issue ?

@slorber
Copy link
Collaborator

@slorber slorber commented Oct 1, 2020

Hi @skr571999 , if you have Windows and can make the tests pass without breaking anything, this is welcome ;)

@skr571999
Copy link

@skr571999 skr571999 commented Oct 1, 2020

@slorber ,Thanks

I have Window 10, I am new to testing but will try my best to pass them. 馃殌

@skr571999
Copy link

@skr571999 skr571999 commented Oct 2, 2020

Hey @slorber ,

As u mention, in PR #3481 about the posixPath() , while I was debugging, I found that some of the Test Cases are failing because of not using this function while comparing the paths. So i tried by using it, then they are working fine.

Question 馃

1- Should I send the PR after passing all the test cases or will it be fine to send the PR after passing the Test Case for Every Package differently ?

@slorber
Copy link
Collaborator

@slorber slorber commented Oct 2, 2020

Hi @skr571999

Honestly I don't know exactly how this problem should be solved and if posixPath is the solution.

You can make a draft PR with some fixed tests but I guess the idea is that the PR tests should pass otherwise we can't merge it.

If you find a way to enable windows jest tests package by package we could merge it even if all windows test are not fixed, but having. all tests running on Windows at once would be a better option.

@skr571999
Copy link

@skr571999 skr571999 commented Oct 2, 2020

ok

I will look .

@skr571999
Copy link

@skr571999 skr571999 commented Oct 4, 2020

Hi @slorber

I Worked over the Tescases and now Status is

image

But there is one Problem that due to some changes the Build is not Successfully running. Because to pass some test case I have made some changes in utils files which are breaking the Build.

Due to this Problem I am thinking that it can be better if we Merge the (PRs) with window fixes Package by package because due to fixes that may break other things.

I noticed the Current testing happening on GitHub is not running the Test Cases for Windows until we merge this Draft PR (#3481)

so what I think we can do

  • I will pass the Test Case and also check for Build for a Package (Like. docusaurus-utils ) on Windows (on my local system)
  • then, i will send the PR for that so it will run all (Test, Builds) on Github for Linux as it running currently
  • if that passes then we can merge that

After all the Tescase Passes on window(Locally) and on Linux on GitHub

  • Then, we can merge this Draft PR (#3481)
  • After Merging this It will check it the Test Cases are running on Both of the Machine On GitHub.

馃 What you think about this way of doing or is there anything else we can do ?

@slorber
Copy link
Collaborator

@slorber slorber commented Oct 5, 2020

Hi,

The PR we merge shouldn't break existing tests on Linux.

However if you feel it's simpler to enable Windows tests package by package, I think it's better to have half the tests working on windows than all windows tests disabled. We can improve incrementally as long as the Linux behavior is not changed.

Temporarily we can enable windows tests to a subset of all packages, instead of all like in the draft PR:

image

@skr571999
Copy link

@skr571999 skr571999 commented Oct 5, 2020

ok, Thanks @slorber

I will send the PR after some Test Cases Fix completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.