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
Gao Sun e1fac554db
test: add console tests for password policy (#4493)
* test: add console tests for password policy

* test: increase time duration

* test: fix sequencer

* chore: add jest-pptr config

* ci: separate experience and console tests

* test: skip tests of unpublished features
2023-09-14 17:28:00 +08:00

19 lines
600 B
JavaScript

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