mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
Add unit tests for containsSpaces handlebars extension.
This commit is contained in:
parent
8d26ae5554
commit
697551bcae
@ -10,4 +10,20 @@ describe('registerHandlebarHelpers', () => {
|
||||
expect(helpers).toContain('notEquals');
|
||||
expect(helpers).toContain('containsSpaces');
|
||||
});
|
||||
|
||||
describe('containsSpaces', () => {
|
||||
it('should return true when string with spaces is passed', () => {
|
||||
registerHandlebarHelpers();
|
||||
const containsSpaces = Handlebars.helpers['containsSpaces'];
|
||||
const result = containsSpaces('I have spaces insideme');
|
||||
expect(result).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should return false when string without spaces is passed', () => {
|
||||
registerHandlebarHelpers();
|
||||
const containsSpaces = Handlebars.helpers['containsSpaces'];
|
||||
const result = containsSpaces('Ihavespacesinsideme');
|
||||
expect(result).toBeFalsy();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user