Skip to main content
Glama
jest.sequencer.mjs909 B
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import * as testSequencer from '@jest/test-sequencer'; const Sequencer = testSequencer.default; /** * The Sequencer class determines the order of tests. * We want to ensure that the seeder test runs first. */ class CustomSequencer extends Sequencer { // eslint-disable-next-line @typescript-eslint/explicit-function-return-type sort(tests) { // Test structure information // https://github.com/facebook/jest/blob/6b8b1404a1d9254e7d5d90a8934087a9c9899dab/packages/jest-runner/src/types.ts#L17-L21 return Array.from(tests).sort((a, b) => { if (a.path.endsWith('seed.test.ts')) { return -1; } if (b.path.endsWith('seed.test.ts')) { return 1; } return a.path.localeCompare(b.path); }); } } export default CustomSequencer;

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/medplum/medplum'

If you have feedback or need assistance with the MCP directory API, please join our Discord server