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

Upgrade testing dependencies: Karma and Mocha #913

Merged
merged 3 commits into from Jul 1, 2019

Conversation

davilima6
Copy link
Member

@davilima6 davilima6 commented Jun 24, 2019

Updated versions:

  • Karma: from ~3.0.0 to ~4.1.0
  • Mocha: from ~3.5.3 to ~6.1.4
  • Chai: from ~3.5.0 to ~4.2.0

I postponed karma-sauce-launcher for now because it failed installing selenium-webdriver@4.0.0-alpha.4 with "incompatible linux platform" for fsversion@1.2.9:

  • karma-sauce-launcher: from 1.2.0 to 2.0.2
yarn install v1.3.2
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@1.2.9: The platform "linux" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
error selenium-webdriver@4.0.0-alpha.4: The engine "node" is incompatible with this module. Expected version ">= 10.15.0".
error Found incompatible module

Finally we may include Sinon too if we solve the problem reported below.

- Karma: from ~3.0.0 to ~4.1.0
- Mocha: from ~3.5.3 to ~6.1.4
@davilima6 davilima6 requested a review from thet June 24, 2019 11:12
@mister-roboto
Copy link

@davilima6 thanks for creating this Pull Request and help improve Plone!

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass.

Whenever you feel that the pull request is ready to be tested, either start all jenkins jobs pull requests by yourself, or simply add a comment in this pull request stating:

@jenkins-plone-org please run jobs

With this simple comment all the jobs will be started automatically.

Happy hacking!

@davilima6
Copy link
Member Author

@jenkins-plone-org please run jobs

@coveralls
Copy link

Coverage Status

Coverage remained the same at 57.527% when pulling 6acb895 on upgrade_testing_deps into 7b32d1b on master.

@davilima6
Copy link
Member Author

davilima6 commented Jun 24, 2019

@thet, @vangheem: This PR is ready for merge but if you have an idea on the error below, we can include also here the upgrade of Sinon from 1.17.1 to 7.3.6: #914.

Sinon's Stub API changed slightly and I'm missing something (ae50e82) so 3 tests fail at same stub call:

  Structure traverse links
    ✗ test navigate to folder push states
	undefined is not an object (evaluating 'history.pushed.url')
	tests/pattern-structure-test.js:1306:28

    ✗ test navigate to folder push states - urlStructure
	undefined is not an object (evaluating 'history.pushed.url') A
	tests/pattern-structure-test.js:2153:28

    ✗ test navigate to folder push states - pushStateUrl
	undefined is not an object (evaluating 'history.pushed.url')
	tests/pattern-structure-test.js:2190:28

When I console.log(history) inside the test it I see the stub but if I do it at code level (patterns/structure/pattern.js) I see the original window.history. Any ideas?

@davilima6
Copy link
Member Author

@jenkins-plone-org please run jobs

Copy link
Member

@thet thet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Regarding the test failures with Sinon - I recently stumbled upon the same problem and gave up fixing the usage of the Sinon API in mockup. I'd merge it without an Sinon upgrade.

@davilima6 davilima6 merged commit c4d9f74 into master Jul 1, 2019
@davilima6
Copy link
Member Author

Alright, let’s leave Sinon for #914.

For this one I don’t think any bundle needs to be recompiled in p.staticresources, but if there’s any please let me know. Thanks!

@davilima6
Copy link
Member Author

Btw I believe no bundles need to be recompiled because only devDependencies were updated.

@davilima6 davilima6 deleted the upgrade_testing_deps branch February 1, 2020 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants