Skip to content

Commit 123524e

Browse files
[FSSDK-11238] space fix
1 parent 864c785 commit 123524e

File tree

2 files changed

+40
-40
lines changed

2 files changed

+40
-40
lines changed

lib/utils/string_value_validator/index.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ import { validate } from './';
1818

1919
describe('validate', () => {
2020
it('should validate the given value is valid string', () => {
21-
expect(validate('validStringValue')).toBe(true);
21+
expect(validate('validStringValue')).toBe(true);
2222
});
2323

2424
it('should return false if given value is invalid string', () => {
25-
expect(validate(null)).toBe(false);
26-
expect(validate(undefined)).toBe(false);
27-
expect(validate('')).toBe(false);
28-
expect(validate(5)).toBe(false);
29-
expect(validate(true)).toBe(false);
30-
expect(validate([])).toBe(false);
25+
expect(validate(null)).toBe(false);
26+
expect(validate(undefined)).toBe(false);
27+
expect(validate('')).toBe(false);
28+
expect(validate(5)).toBe(false);
29+
expect(validate(true)).toBe(false);
30+
expect(validate([])).toBe(false);
3131
});
3232
});

lib/utils/user_profile_service_validator/index.spec.ts

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ describe('validate', () => {
2424
save: function() {},
2525
};
2626

27-
expect(() => validate(missingLookupFunction)).toThrowError(OptimizelyError);
27+
expect(() => validate(missingLookupFunction)).toThrowError(OptimizelyError);
2828

29-
try {
30-
validate(missingLookupFunction);
31-
} catch(err) {
32-
expect(err).instanceOf(OptimizelyError);
33-
expect(err.baseMessage).toBe(INVALID_USER_PROFILE_SERVICE);
34-
expect(err.params).toEqual(["Missing function 'lookup'"]);
35-
}
29+
try {
30+
validate(missingLookupFunction);
31+
} catch (err) {
32+
expect(err).instanceOf(OptimizelyError);
33+
expect(err.baseMessage).toBe(INVALID_USER_PROFILE_SERVICE);
34+
expect(err.params).toEqual(["Missing function 'lookup'"]);
35+
}
3636
});
3737

3838
it("should throw if 'lookup' is not a function", () => {
@@ -41,31 +41,31 @@ describe('validate', () => {
4141
lookup: 'notGonnaWork',
4242
};
4343

44-
expect(() => validate(lookupNotFunction)).toThrowError(OptimizelyError);
44+
expect(() => validate(lookupNotFunction)).toThrowError(OptimizelyError);
4545

46-
try {
47-
validate(lookupNotFunction);
48-
} catch(err) {
49-
expect(err).instanceOf(OptimizelyError);
50-
expect(err.baseMessage).toBe(INVALID_USER_PROFILE_SERVICE);
51-
expect(err.params).toEqual(["Missing function 'lookup'"]);
52-
}
46+
try {
47+
validate(lookupNotFunction);
48+
} catch (err) {
49+
expect(err).instanceOf(OptimizelyError);
50+
expect(err.baseMessage).toBe(INVALID_USER_PROFILE_SERVICE);
51+
expect(err.params).toEqual(["Missing function 'lookup'"]);
52+
}
5353
});
5454

5555
it("should throw if the instance does not provide a 'save' function", () => {
5656
const missingSaveFunction = {
5757
lookup: function() {},
5858
};
5959

60-
expect(() => validate(missingSaveFunction)).toThrowError(OptimizelyError);
60+
expect(() => validate(missingSaveFunction)).toThrowError(OptimizelyError);
6161

62-
try {
63-
validate(missingSaveFunction);
64-
} catch(err) {
65-
expect(err).instanceOf(OptimizelyError);
66-
expect(err.baseMessage).toBe(INVALID_USER_PROFILE_SERVICE);
67-
expect(err.params).toEqual(["Missing function 'save'"]);
68-
}
62+
try {
63+
validate(missingSaveFunction);
64+
} catch (err) {
65+
expect(err).instanceOf(OptimizelyError);
66+
expect(err.baseMessage).toBe(INVALID_USER_PROFILE_SERVICE);
67+
expect(err.params).toEqual(["Missing function 'save'"]);
68+
}
6969
});
7070

7171
it("should throw if 'save' is not a function", () => {
@@ -74,15 +74,15 @@ describe('validate', () => {
7474
save: 'notGonnaWork',
7575
};
7676

77-
expect(() => validate(saveNotFunction)).toThrowError(OptimizelyError);
77+
expect(() => validate(saveNotFunction)).toThrowError(OptimizelyError);
7878

79-
try {
80-
validate(saveNotFunction);
81-
} catch(err) {
82-
expect(err).instanceOf(OptimizelyError);
83-
expect(err.baseMessage).toBe(INVALID_USER_PROFILE_SERVICE);
84-
expect(err.params).toEqual(["Missing function 'save'"]);
85-
}
79+
try {
80+
validate(saveNotFunction);
81+
} catch (err) {
82+
expect(err).instanceOf(OptimizelyError);
83+
expect(err.baseMessage).toBe(INVALID_USER_PROFILE_SERVICE);
84+
expect(err.params).toEqual(["Missing function 'save'"]);
85+
}
8686
});
8787

8888
it('should return true if the instance is valid', () => {
@@ -91,6 +91,6 @@ describe('validate', () => {
9191
lookup: function() {},
9292
};
9393

94-
expect(validate(validInstance)).toBe(true);
94+
expect(validate(validInstance)).toBe(true);
9595
});
9696
});

0 commit comments

Comments
 (0)