-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e7ab48
commit 1308477
Showing
3 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { mondaycodercSchema } from 'services/schemas/mondaycoderc-schema'; | ||
|
||
describe('mondaycodercSchema Validation', () => { | ||
it('should validate a correct Python runtime and version', () => { | ||
const data = { RUNTIME: 'Python', RUNTIME_VERSION: '3.10.1' }; | ||
expect(() => mondaycodercSchema.parse(data)).not.toThrow(); | ||
}); | ||
|
||
it('should invalidate an incorrect Python runtime version', () => { | ||
const data = { RUNTIME: 'Python', RUNTIME_VERSION: '2.7.0' }; | ||
expect(() => mondaycodercSchema.parse(data)).toThrow('Invalid RUNTIME_VERSION for the specified RUNTIME'); | ||
}); | ||
|
||
it('should validate a correct Java runtime and version', () => { | ||
const data = { RUNTIME: 'Java', RUNTIME_VERSION: '17' }; | ||
expect(() => mondaycodercSchema.parse(data)).not.toThrow(); | ||
}); | ||
|
||
it('should invalidate a missing runtime version when runtime is specified', () => { | ||
const data = { RUNTIME: 'Java' }; | ||
expect(() => mondaycodercSchema.parse(data)).toThrow('Invalid RUNTIME_VERSION for the specified RUNTIME'); | ||
}); | ||
|
||
it('should validate when runtime is not specified', () => { | ||
const data = {}; | ||
expect(() => mondaycodercSchema.parse(data)).not.toThrow(); | ||
}); | ||
|
||
it('should invalidate an incorrect Go runtime version', () => { | ||
const data = { RUNTIME: 'Go', RUNTIME_VERSION: '2.0.0' }; | ||
expect(() => mondaycodercSchema.parse(data)).toThrow('Invalid RUNTIME_VERSION for the specified RUNTIME'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,12 +50,12 @@ | |
} | ||
}, | ||
"include": [ | ||
"src/**/*", | ||
"src/**/*" | ||
], | ||
"exclude": [ | ||
"test", | ||
"node_modules", | ||
"bin", | ||
"dist", | ||
"dist" | ||
] | ||
} |