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

issue with upgrade to version 10.1.1 #209

Open
AramSol opened this issue Aug 8, 2024 · 4 comments
Open

issue with upgrade to version 10.1.1 #209

AramSol opened this issue Aug 8, 2024 · 4 comments

Comments

@AramSol
Copy link

AramSol commented Aug 8, 2024

After upgrading to version 10.1.1, we encountered an error. The same tests were working fine with versions earlier than 10.

image

The unit tests run fine in the browser, but the error only appears when trying to run them with grunt-contrib-qunit.
image

@Krinkle
Copy link
Contributor

Krinkle commented Aug 8, 2024

It looks like you're using QUnit 2.3.2 which is quite old. Consider updating that first!

https://github.com/qunitjs/qunit/blob/2.21.1/History.md

https://qunitjs.com/api/callbacks/QUnit.on/#the-error-event

The README says the minimum version is 2.2.0 which is incorrect indeed.

@AramSol
Copy link
Author

AramSol commented Aug 8, 2024

@Krinkle thanks for fast replay, we are using ui5 framework that provide only QUnit 2.3.2 and QUnit 1.18.0, it there any other way to fix this issue?

@Krinkle
Copy link
Contributor

Krinkle commented Aug 8, 2024

@AramSol You can use grunt-contrib-qunit 9.x for the time being. I also recommend filing an issue with UI5 to upgrade QUnit. There have been no breaking changes inside QUnit 2.x over the past 8 years. This should be a safe upgrade for them.

@Krinkle
Copy link
Contributor

Krinkle commented Aug 8, 2024

@AramSol See also SAP/openui5#3832, SAP/openui5#3204 (comment), SAP/openui5#1359, SAP/openui5#1105.

I believe if you modify your HTML file, you can use any QUnit version you like, instead of the default. For example, you can remove the loading of sap's qunit, and instead add:

<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-2.21.0.css">
<script src="https://code.jquery.com/qunit/qunit-2.21.0.js"></script>

Or, if you add "qunit": "^2.21.0" to package.json, you can reference ../node_modules/qunit/qunit/qunit.css and ../node_modules/qunit/qunit/qunit.js instead.

Krinkle added a commit that referenced this issue Aug 8, 2024
Krinkle added a commit that referenced this issue Aug 8, 2024
straker added a commit to dequelabs/axe-core that referenced this issue Aug 28, 2024
When I updated #4548 to latest
it caused the qunit tests to fail. Turns out that
[qunitjs](https://www.npmjs.com/package/qunitjs) has been deprecated and
is now called just `qunit`, and `grunt-contrib-qunit` [has
issues](gruntjs/grunt-contrib-qunit#209) if
not using latest qunit. Once upgraded I was able to get the tests
passing but only in headed mode. That was because puppeteer [is now
headless by
default](https://github.com/gruntjs/grunt-contrib-qunit/blob/main/docs/qunit-options.md#puppeteer),
so passing the `ignoreDefaultArgs` param and the `--headless` arg was
causing the issue.

`jest_react` was also failing and after trying to fix it with it's
current dependencies @dbjorge suggested it would be better to just
change it over to `@react/testing-library`. It also means we can support
react 18 in the examples too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants