Skip to content

Jasmine 3 runner - #57

Draft
aminya wants to merge 3 commits into
masterfrom
jasmine3
Draft

Jasmine 3 runner#57
aminya wants to merge 3 commits into
masterfrom
jasmine3

Conversation

@aminya

Copy link
Copy Markdown
Member

No description provided.

@aminya

aminya commented Jul 20, 2020

Copy link
Copy Markdown
MemberAuthor

@DeeDeeGIn the renderer tests (tests affected by this pull request), apm is not detected for some reason. Should we put it on the path? This is fixed in Jasmine3 runner 5.0.0

@UziTech Any thoughts about this? If I recall correctly, Jasmine 3 is faster in running the tests, and it has the capability to run the tests in parallel. If we can convert some of the expensive tests (e.g. pane-spec.js) to Jasmine 3, we can solve the timeout issues

Comment threadvendor/jasmine3-runner.js Outdated
@UziTech

Copy link
Copy Markdown
Member

I don't believe Jasmine v3 runs tests in parallel although that may be something that is added in the next release (jasmine/jasmine-npm#153)

The biggest benefit I see in using Jasmine v3 over v1.3 is being able to use newer async features and matchers.

@aminya

Copy link
Copy Markdown
MemberAuthor

Something strange is happening here: https://dev.azure.com/atomcommunity/atomcommunity/_build/results?buildId=340&view=logs&j=0c24d9d5-0e27-5404-37e0-91cb4d692d0c&t=3786b6db-cb02-5fcf-294f-324dd576bffa

Although all the tests have passed, the code has exited with 0 number.

@UziTech

Copy link
Copy Markdown
Member

hmm 🤔 the only thing I can think is if there is an async call that isn't awaited and fails. so the test finishes with async functions still running that fails an expect.

@aminya

Copy link
Copy Markdown
MemberAuthor

hmm 🤔 the only thing I can think is if there is an async call that isn't awaited and fails. so the test finishes with async functions still running that fails an expect.

Which async call? Here all the tests failed. async.parallel just runs child processes independently and asynchronously, and in the end reports the errors. It is done by async lib. We can switch to async.series for checking

@UziTech

Copy link
Copy Markdown
Member

Which async call?

I haven't looked through the tests, it was just an idea of something that could make it show 0 failures and still fail.

e.g.

// this test will not be marked a failure but still failit("test",()=>{setTimeout(()=>{expect(1).toBe(2);},1000);});

@aminya

Copy link
Copy Markdown
MemberAuthor

There should be no difference here. I am just using the same Jasmine 1 using the new Jasmine 3 runner. 🤔 There is no async call in the tests themselves or in the test script. They are child processes that call the test like atom --test spec/something.js.

@DeeDeeG

This comment has been minimized.

@aminyaaminya added the help wanted Extra attention is needed label Aug 17, 2020
@aminya
aminyaforce-pushed the master branch 2 times, most recently from f3c93bd to e1645f5CompareAugust 22, 2020 09:35
@aminya

Copy link
Copy Markdown
MemberAuthor

I found why the tests fail here.

UziTech/atom-jasmine3-test-runner#166 (fixed) and UziTech/atom-jasmine3-test-runner#167 (hopefully will be fixed) are the two of the reasons.

@UziTech

Copy link
Copy Markdown
Member

UziTech/atom-jasmine3-test-runner#167 only deals with the testPaths option. since atom doesn't use the testPaths option UziTech/atom-jasmine3-test-runner#167 won't do anything to help make the tests pass.

If the tests are failing because there are no tests in some packages then we should make tests for those packages.

@aminyaaminya closed this Jul 22, 2021
@aminyaaminya closed this Jul 22, 2021
@aminyaaminya reopened this Jul 22, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@aminya@UziTech@DeeDeeG