Skip to content

Commit

Permalink
update tracer mock report to be function and add mock of submit (#26)
Browse files Browse the repository at this point in the history
* update tracer mock report to be function and add mock of submit

* update changelog to mention bug fix for tracer
  • Loading branch information
James Baxley authored and helfer committed Jun 13, 2016
1 parent 853ebfb commit 3bad1c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

### v.NEXT

* BUG: Fixed a bug with tracer mocks that would throw a TypeError when using Ava [#26](https://github.com/apollostack/apollo-server/pull/26)

### v0.1.3

Expand Down
6 changes: 5 additions & 1 deletion src/apolloServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ export default function apolloServer(options, ...rest) {

// Tracer-related stuff ------------------------------------------------

tracerLogger = { log: undefined, report: undefined };
tracerLogger = {
log: undefined,
report: () => {},
sumbit: () => {}
};
if (tracer) {
tracerLogger = tracer.newLoggerInstance();
tracerLogger.log('request.info', {
Expand Down

0 comments on commit 3bad1c8

Please sign in to comment.