Skip to content

Commit 8b6ebc4

Browse files
Exposing internals for unit testing breaks the "lightweight" concept
I initially exposed this to unit test the custom "extend" implementation without jquery, but the test named "passing options reference" already test if options are being modified when removing the cookie. There is no need to duplicate the test here. Also, an exposed internal implementation might be used in the wild, so let's avoid that.
1 parent 5764f3e commit 8b6ebc4

2 files changed

Lines changed: 0 additions & 11 deletions

File tree

‎src/jquery.cookie.js‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,5 @@
129129
return !api(key);
130130
};
131131

132-
api._extend = extend;
133-
134132
return api;
135133
}));

‎test/tests.js‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -347,12 +347,3 @@ test('read converter with raw = true', function() {
347347
Cookies.set('c', '1');
348348
strictEqual(Cookies.get('c', Number), 1, 'does not decode, but converts read value');
349349
});
350-
351-
module('merge');
352-
353-
test('passing object reference', function() {
354-
expect(1);
355-
var original = {};
356-
Cookies._extend(original, { key: 'value' });
357-
deepEqual(original, {}, 'should not alter the original object');
358-
});

0 commit comments

Comments
 (0)