mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
e1fac554db
* 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
19 lines
600 B
JavaScript
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;
|