0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/packages/integration-tests/ui-test-sequencer.js
Charles Zhao f1730db70b
test(test): add tests for console user management (#3863)
* test(test): add tests for console user management

* chore: remove unused dependency

* chore: remove testing screenshots
2023-05-22 13:31:45 +08:00

18 lines
549 B
JavaScript

import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
const Sequencer = require('@jest/test-sequencer').default;
const bootstrapTestSuitePathSuffix = '/tests/ui/bootstrap.test.js';
class CustomSequencer extends Sequencer {
sort(tests) {
const bootstrap = tests.find(({ path }) => path.includes(bootstrapTestSuitePathSuffix));
return [
bootstrap,
...tests.filter(({ path }) => !path.includes(bootstrapTestSuitePathSuffix)),
].filter(Boolean);
}
}
export default CustomSequencer;