feat: add resumable competition migration runner

This commit is contained in:
dahyeon committed 2026-07-12 19:34:52 +00:00
1 parent 55e5b8df70
commit ee4c3eeb27
5 files changed
+1608

No files matched your search

@@ -0,0 +1,34 @@
import { parseCliOptions } from './run-competition-domain';
describe('competition domain migration CLI', () => {
const originalNodeEnv = process.env.NODE_ENV;
beforeEach(() => {
process.env.NODE_ENV = 'dev';
});
afterAll(() => {
process.env.NODE_ENV = originalNodeEnv;
});
it('ignores pnpm standalone separators before dry-run and apply options', () => {
expect(parseCliOptions(['--', '--dry-run'])).toMatchObject({
dryRun: true,
help: false,
nodeEnv: 'dev',
});
expect(parseCliOptions(['--', '--apply'])).toMatchObject({
dryRun: false,
help: false,
nodeEnv: 'dev',
});
});
it('recognizes help after a pnpm standalone separator without exiting', () => {
expect(parseCliOptions(['--', '--help'])).toMatchObject({
dryRun: true,
help: true,
nodeEnv: 'dev',
});
});
});