Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/javascripts/lib/utils/accessor_spec.js')
-rw-r--r--spec/javascripts/lib/utils/accessor_spec.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/spec/javascripts/lib/utils/accessor_spec.js b/spec/javascripts/lib/utils/accessor_spec.js
index b768d6f2a68..0045330e470 100644
--- a/spec/javascripts/lib/utils/accessor_spec.js
+++ b/spec/javascripts/lib/utils/accessor_spec.js
@@ -13,7 +13,11 @@ describe('AccessorUtilities', () => {
});
it('should return `false` if access throws an error', () => {
- base = { get testProp() { throw testError; } };
+ base = {
+ get testProp() {
+ throw testError;
+ },
+ };
expect(AccessorUtilities.isPropertyAccessSafe(base, 'testProp')).toBe(false);
});
@@ -35,7 +39,9 @@ describe('AccessorUtilities', () => {
});
it('should return `false` if calling throws an error', () => {
- base.func = () => { throw new Error('test error'); };
+ base.func = () => {
+ throw new Error('test error');
+ };
expect(AccessorUtilities.isFunctionCallSafe(base, 'func')).toBe(false);
});
@@ -58,7 +64,9 @@ describe('AccessorUtilities', () => {
});
it('should return `false` if access to .setItem isnt safe', () => {
- window.localStorage.setItem.and.callFake(() => { throw testError; });
+ window.localStorage.setItem.and.callFake(() => {
+ throw testError;
+ });
expect(AccessorUtilities.isLocalStorageAccessSafe()).toBe(false);
});