test(up): start writing some tests for the "up" command
This commit is contained in:
parent
de5fccfa52
commit
43a220d633
5 changed files with 244 additions and 12 deletions
|
|
@ -3,6 +3,8 @@ import fs from 'node:fs/promises';
|
|||
import { type MigrationMetadata } from '@emigrate/plugin-tools/types';
|
||||
import { withLeadingPeriod } from './with-leading-period.js';
|
||||
|
||||
export type GetMigrationsFunction = typeof getMigrations;
|
||||
|
||||
export const getMigrations = async (cwd: string, directory: string): Promise<MigrationMetadata[]> => {
|
||||
const allFilesInMigrationDirectory = await fs.readdir(path.resolve(cwd, directory), {
|
||||
withFileTypes: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue