Change tests

This commit is contained in:
Kristina Durivage
2025-03-05 08:25:13 -06:00
parent e96fd0dcb2
commit a190243617
+10 -6
View File
@@ -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);
});
});