-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split jest tests into fast and slow groups (#1401)
- Loading branch information
Showing
22 changed files
with
80 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import type { JestConfigWithTsJest } from 'ts-jest' | ||
import baseConfig from './jest.config.base' | ||
|
||
const jestConfig: JestConfigWithTsJest = { | ||
...baseConfig, | ||
displayName: 'fast', | ||
setupFiles: ['./tests-ui/tests/fast/globalSetup.ts'], | ||
setupFilesAfterEnv: undefined, | ||
testMatch: ['**/tests-ui/tests/fast/**/*.test.ts'] | ||
} | ||
|
||
export default jestConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { JestConfigWithTsJest } from 'ts-jest' | ||
import baseConfig from './jest.config.base' | ||
|
||
const jestConfig: JestConfigWithTsJest = { | ||
...baseConfig, | ||
displayName: 'slow (DOM)', | ||
testTimeout: 10000, | ||
testMatch: ['**/tests-ui/tests/slow/**/*.test.ts'] | ||
} | ||
|
||
export default jestConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
tests-ui/tests/comfyWorkflow.test.ts → tests-ui/tests/fast/comfyWorkflow.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module.exports = async function () { | ||
jest.mock('@/services/dialogService', () => { | ||
return { | ||
showLoadWorkflowWarning: jest.fn(), | ||
showMissingModelsWarning: jest.fn(), | ||
showSettingsDialog: jest.fn(), | ||
showExecutionErrorDialog: jest.fn(), | ||
showTemplateWorkflowsDialog: jest.fn(), | ||
showPromptDialog: jest | ||
.fn() | ||
.mockImplementation((message, defaultValue) => { | ||
return Promise.resolve(defaultValue) | ||
}) | ||
} | ||
}) | ||
|
||
jest.mock('vue-i18n', () => { | ||
return { | ||
useI18n: jest.fn() | ||
} | ||
}) | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
tests-ui/tests/exampleWorkflows.test.ts → tests-ui/tests/slow/exampleWorkflows.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
tests-ui/tests/extensions.test.ts → tests-ui/tests/slow/extensions.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
tests-ui/tests/store/keybindingStore.test.ts → .../tests/slow/store/keybindingStore.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters