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

enable embroider scenarios #699

Merged
merged 2 commits into from
Sep 9, 2021
Merged

Conversation

stefanpenner
Copy link
Contributor

@stefanpenner stefanpenner commented Sep 9, 2021

For embroider tests:

  • inline module define are being re-written by embroider confusing the test. Maybe we can use a noconflict loader instead.
not ok 2 Chrome 92.0 - [1 ms] - TestLoader Failures: dummy/tests/unit/exports-test: could not be loaded
    ---
        actual: >
            null
        stack: >
            TypeError: (0 , _externals_qunit__WEBPACK_IMPORTED_MODULE_0__.module) is not a function
                at eval (webpack://dummy/./tests/unit/exports-test.js?:10:57)
                at Object../tests/unit/exports-test.js (http://localhost:7357/assets/chunk.6024f09b703bdf0ca33a.js:51:1)
                at __webpack_require__ (http://localhost:7357/assets/chunk.6024f09b703bdf0ca33a.js:96:41)
                at Module.eval [as callback] (webpack://dummy/./assets/test.js?:190:10)
                at Module.exports (http://localhost:7357/assets/vendor.js:112:32)
                at requireModule (http://localhost:7357/assets/vendor.js:33:18)
                at TestLoader.eval (webpack://dummy/../../node_modules/ember-cli-test-loader/test-support/index.js?:95:16)
                at TestLoader.require (webpack://dummy/../../node_modules/ember-cli-test-loader/test-support/index.js?:85:25)
                at TestLoader.loadModules (webpack://dummy/../../node_modules/ember-cli-test-loader/test-support/index.js?:76:14)
                at loadTests (webpack://dummy/../../node_modules/ember-qunit/test-loader.js?:88:20)
                

@stefanpenner stefanpenner marked this pull request as draft September 9, 2021 16:49
 
Embroider wants to take over global defines, in-order to give them some specific treatments. Our tests in ember-resolver, where mutating the global loader by declaring it’s own global defines. 

Polluting the global state isn’t best practice, especially if there is a public API abstracting the global state. This PR 1) ensures the classic resolver always uses that abstraction 2) provides a test specific piece of state which implements the abstraction.
@stefanpenner stefanpenner marked this pull request as ready for review September 9, 2021 19:44
@stefanpenner stefanpenner merged commit 5f4546e into master Sep 9, 2021
@delete-merged-branch delete-merged-branch bot deleted the enable-remaining-scenarios branch September 9, 2021 19:44
Sign up for free to 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.

None yet

1 participant