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

Qunit has already been defined (ember-qunit v8 in addon) #1149

Closed
Techn1x opened this issue Oct 16, 2023 · 5 comments
Closed

Qunit has already been defined (ember-qunit v8 in addon) #1149

Techn1x opened this issue Oct 16, 2023 · 5 comments

Comments

@Techn1x
Copy link

Techn1x commented Oct 16, 2023

I think this issue has popped up again
#752

I've attempted to update ember-qunit from v7 to v8.0.1 in my addon, but all tests fail with
Uncaught Error: QUnit has already been defined

$ pnpm ember test
Environment: test
cleaning up...
Built project successfully. Stored in "/var/folders/7h/vh7gy6f922v9xyl7ztlwwpy40000gn/T/tests-dist-2023916-96555-1w4wfu0.xj8l".
not ok 1 Chrome 117.0 - [undefined ms] - Global error: Uncaught Error: QUnit has already been defined. at webpack://__ember_auto_import__/../../node_modules/.pnpm/qunit@2.20.0/node_modules/qunit/qunit/qunit.js?, line 597
    ---
        browser log: |
            {"type":"error","text":"Uncaught Error: QUnit has already been defined. at webpack://__ember_auto_import__/../../node_modules/.pnpm/qunit@2.20.0/node_modules/qunit/qunit/qunit.js?, line 597\n","testContext":{}}
    ...
not ok 2 Chrome 117.0 - [undefined ms] - Global error: Uncaught Error: The tests file was not loaded. Make sure your tests index.html includes "assets/tests.js". at http://localhost:7357/925127230999375/tests/index.html?hidepassed, line 47
    ---
        browser log: |
            {"type":"error","text":"Uncaught Error: The tests file was not loaded. Make sure your tests index.html includes \"assets/tests.js\". at http://localhost:7357/925127230999375/tests/index.html?hidepassed, line 47\n","testContext":{"state":"complete"}}

Is there some configuration I need to do as part of this update to avoid this error? ember-auto-import 2.6.3 is listed as a dependency, and these are the relevant devdeps for the addon..

    "ember-cli": "^5.3.0",
    "ember-qunit": "^8.0.1",
    "ember-sinon-qunit": "7.2.0",
    "qunit": "^2.20.0",
    "qunit-dom": "^3.0.0",
@NullVoxPopuli
Copy link
Sponsor Collaborator

Does it still exist after running pnpm dedupe?

@Techn1x
Copy link
Author

Techn1x commented Oct 16, 2023

Unfortunately won't be at my computer for another ~12 hours, I'll give it a go in the morning!

@Techn1x
Copy link
Author

Techn1x commented Oct 17, 2023

No luck with the dedupe, same error

@Techn1x
Copy link
Author

Techn1x commented Oct 17, 2023

I tried removing ember-sinon-qunit, and then it got past that error.

So I went and sleuthed that project and sure enough it's already been reported
elwayman02/ember-sinon-qunit#885

@Techn1x
Copy link
Author

Techn1x commented Oct 17, 2023

Closing, as it looks like it's an issue over at ember-sinon-qunit rather than here

@Techn1x Techn1x closed this as completed Oct 17, 2023
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