Skip to content

Commit b299a49

Browse files
committed
add some tests
1 parent e2c7e73 commit b299a49

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/raven.test.js

+12
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,18 @@ describe('Raven (public API)', function() {
873873
wrapped();
874874
assert.isTrue(spy.calledOnce);
875875
});
876+
it('should copy property when wrapping function', function() {
877+
var func = function() {};
878+
func.test = true;
879+
var wrapped = Raven.wrap(func);
880+
assert.isTrue(wrapped.test);
881+
});
882+
it('should not copy prototype property when wrapping function', function() {
883+
var func = function() {};
884+
func.prototype.test = true;
885+
var wrapped = Raven.wrap(func);
886+
assert.isUndefined(new wrapped().test);
887+
});
876888
});
877889

878890
describe('.context', function() {

0 commit comments

Comments
 (0)