From 1d38b973eed177ec2401c19045136d143d0831e1 Mon Sep 17 00:00:00 2001 From: David Majda Date: Fri, 21 Aug 2015 17:36:34 +0200 Subject: [PATCH] Custom tracers specs: Simplify code slightly --- spec/api/generated-parser-api.spec.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spec/api/generated-parser-api.spec.js b/spec/api/generated-parser-api.spec.js index 403d5e4..9a05eb6 100644 --- a/spec/api/generated-parser-api.spec.js +++ b/spec/api/generated-parser-api.spec.js @@ -1,4 +1,4 @@ -/* global describe, expect, it, PEG, spyOn */ +/* global describe, expect, it, jasmine, PEG, spyOn */ "use strict"; @@ -74,9 +74,7 @@ describe("generated parser API", function() { describe("custom tracers", function() { describe("trace", function() { it("receives tracing events", function() { - var tracer = { trace: function() { } }; - - spyOn(tracer, "trace"); + var tracer = jasmine.createSpyObj("tracer", ["trace"]); parser.parse("b", { tracer: tracer });