Skip to content

Commit

Permalink
Test and verify edge cases with strict mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Wendelin committed Dec 15, 2014
1 parent 22f99f9 commit 82c108f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build/jshint.xml: build
test-ci: build/jshint.xml
@echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID)
@NODE_ENV=test ./node_modules/karma/bin/karma start karma.conf.ci.js --single-run && \
cat ./coverage/Chrome*/lcov.info | ./node_modules/coveralls/bin/coveralls.js --verbose
cat ./coverage/Firefox*/lcov.info | ./node_modules/coveralls/bin/coveralls.js --verbose

clean:
rm -fr build coverage dist *.log
Expand Down
2 changes: 1 addition & 1 deletion spec/stack-generator-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('StackGenerator', function () {
bar();
};
var bar = function bar() {
stackFrames = StackGenerator.backtrace();
stackFrames = StackGenerator.backtrace({maxStackSize: 25});
};
foo();

Expand Down
2 changes: 1 addition & 1 deletion stack-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
var curr = arguments.callee;
while (curr && stack.length < maxStackSize) {
var args = [].slice.call(curr['arguments']);
if (/function(?:\s+([\w$]+))?\s*\(/.test(curr.toString())) {
if (/function(?:\s+([\w$]+))+\s*\(/.test(curr.toString())) {
stack.push(new StackFrame(RegExp.$1 || undefined, args));
} else {
stack.push(new StackFrame(undefined, args));
Expand Down

0 comments on commit 82c108f

Please sign in to comment.