- 
                Notifications
    You must be signed in to change notification settings 
- Fork 653
QUnit: synchronized executeAsyncMock setups and terminates #31442
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR synchronizes the setup and teardown of executeAsyncMock across QUnit test files to ensure proper test isolation. The changes move mock lifecycle management from global scope into individual test module hooks (beforeEach/afterEach), preventing potential test interference.
Key Changes:
- Removed global executeAsyncMock.setup()calls that were executing once per file
- Added executeAsyncMock.setup()tobeforeEachhooks andexecuteAsyncMock.teardown()toafterEachhooks in multiple test modules
- Fixed a case in collectionWidget.tests.jswhere teardown was in the wrong location
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description | 
|---|---|
| packages/devextreme/testing/tests/DevExpress.ui/collectionWidget.tests.js | Moved executeAsyncMock.teardown()from module-level afterEach to individual test where mock is actually used | 
| packages/devextreme/testing/tests/DevExpress.ui.widgets/popup.tests.js | Removed global setup call and added setup/teardown pairs to multiple test modules' beforeEach/afterEach hooks | 
| packages/devextreme/testing/tests/DevExpress.ui.widgets/popup.materialTheme.tests.js | Removed global setup call and added setup/teardown pair to module hooks | 
| packages/devextreme/testing/tests/DevExpress.ui.widgets/gallery.tests.js | Moved teardown from module afterEach to individual test | 
| packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnsController.tests.js | Added teardownModulecall to afterEach hook | 
| packages/devextreme/testing/tests/DevExpress.knockout/collectionWidget.tests.js | Added executeAsyncMock.setup()to beforeEach hook | 
| packages/devextreme/testing/tests/Bootstrap Integration/widget_bundled.tests.js | Removed global setup call | 
        
          
                packages/devextreme/testing/tests/DevExpress.ui/collectionWidget.tests.js
          
            Show resolved
            Hide resolved
        
      8ad086b    to
    071cd26      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
        
          
                packages/devextreme/testing/tests/DevExpress.ui.widgets/tabPanel.tests.js
              
                Outdated
          
            Show resolved
            Hide resolved
        
      4789960    to
    d0eadb3      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
No description provided.