Skip to content

Commit

Permalink
fix test and message
Browse files Browse the repository at this point in the history
  • Loading branch information
bhapas committed Dec 19, 2024
1 parent 2e7930c commit 039eead
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,6 @@ describe('isValidName', () => {
expect(isValidName('anotherValidName')).toBe(true);
});

it('should return false for names with numbers', () => {
expect(isValidName('invalid123')).toBe(false);
expect(isValidName('123invalid')).toBe(false);
expect(isValidName('invalid_123')).toBe(false);
});

it('should return false for empty string', () => {
expect(isValidName('')).toBe(false);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function buildPackage(integration: Integration): Promise<Buffer> {

if (!isValidName(integration.name)) {
throw new Error(
`Invalid integration name: ${integration.name}, Should only contain letters and underscores`
`Invalid integration name: ${integration.name}, Should only contain letters, numbers and underscores`
);
}

Expand All @@ -49,7 +49,7 @@ export async function buildPackage(integration: Integration): Promise<Buffer> {
const dataStreamName = dataStream.name;
if (!isValidName(dataStreamName)) {
throw new Error(
`Invalid datastream name: ${dataStreamName}, Should only contain letters and underscores`
`Invalid datastream name: ${dataStreamName}, Should only contain letters, numbers and underscores`
);
}
const specificDataStreamDir = joinPath(dataStreamsDir, dataStreamName);
Expand Down

0 comments on commit 039eead

Please sign in to comment.