Skip to content

Commit

Permalink
confirm if pushed
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshshanmugam committed Aug 1, 2024
1 parent af5512e commit 73d092f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions __tests__/push/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,16 @@ heartbeat.monitors:
await writeFile(
testJourney,
`import {journey, monitor} from '../../../';
journey('journey a', () => monitor.use({ id: 'ja', tags: ['chunk'] }));
journey('journey b', () => monitor.use({ id: 'jb', tags: ['chunk'] }));`
journey('a', () => monitor.use({ tags: ['chunk'] }));
journey('b', () => monitor.use({ tags: ['chunk'] }));`
);
const output = await runPush([...DEFAULT_ARGS, '--tags', 'chunk'], {
CHUNK_SIZE: '1',
});
await rm(testJourney, { force: true });
expect(output).toContain('Added(2)');
expect(output).toContain('creating or updating 1 monitors');
expect(output).toContain('✓ Pushed:');
});

['8.5.0', '8.6.0'].forEach(version => {
Expand Down
5 changes: 2 additions & 3 deletions src/push/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,8 @@ export function validateSettings(opts: PushOptions) {
- CLI '--schedule <mins>'
- Config file 'monitors.schedule' field`;
} else if (opts.schedule && !ALLOWED_SCHEDULES.includes(opts.schedule)) {
reason = `Set default schedule(${
opts.schedule
}) to one of the allowed values - ${ALLOWED_SCHEDULES.join(',')}`;
reason = `Set default schedule(${opts.schedule
}) to one of the allowed values - ${ALLOWED_SCHEDULES.join(',')}`;
}

if (!reason) return;
Expand Down

0 comments on commit 73d092f

Please sign in to comment.