Change tests
This commit is contained in:
@@ -25,19 +25,19 @@ describe('validator', () => {
|
||||
expect(numberOrVariableValidator('1')).toBe(true);
|
||||
});
|
||||
|
||||
it('validats a string that is a negative integer', () => {
|
||||
it('validates a string that is a negative integer', () => {
|
||||
expect(numberOrVariableValidator('-1')).toBe(true);
|
||||
});
|
||||
|
||||
it('validats a string that is zero', () => {
|
||||
it('validates a string that is zero', () => {
|
||||
expect(numberOrVariableValidator('0')).toBe(true);
|
||||
});
|
||||
|
||||
it('validats a string that is a float', () => {
|
||||
it('validates a string that is a float', () => {
|
||||
expect(numberOrVariableValidator('1.2')).toBe(true);
|
||||
});
|
||||
|
||||
it('validats a string that is a negative float', () => {
|
||||
it('validates a string that is a negative float', () => {
|
||||
expect(numberOrVariableValidator('-1.2')).toBe(true);
|
||||
});
|
||||
|
||||
@@ -49,7 +49,11 @@ describe('validator', () => {
|
||||
expect(numberOrVariableValidator('$foo')).toBe(true);
|
||||
});
|
||||
|
||||
it('fails a string that has multiple variables', () => {
|
||||
expect(numberOrVariableValidator('$foo$asd')).toBe(false);
|
||||
it('validates a string that has multiple variables', () => {
|
||||
expect(numberOrVariableValidator('$foo$asd')).toBe(true);
|
||||
});
|
||||
|
||||
it('validates a string that has a bracket variable', () => {
|
||||
expect(numberOrVariableValidator('${foo}')).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user