Custom tracers specs: Simplify code slightly
This commit is contained in:
parent
671c22e80f
commit
1d38b973ee
|
@ -1,4 +1,4 @@
|
||||||
/* global describe, expect, it, PEG, spyOn */
|
/* global describe, expect, it, jasmine, PEG, spyOn */
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -74,9 +74,7 @@ describe("generated parser API", function() {
|
||||||
describe("custom tracers", function() {
|
describe("custom tracers", function() {
|
||||||
describe("trace", function() {
|
describe("trace", function() {
|
||||||
it("receives tracing events", function() {
|
it("receives tracing events", function() {
|
||||||
var tracer = { trace: function() { } };
|
var tracer = jasmine.createSpyObj("tracer", ["trace"]);
|
||||||
|
|
||||||
spyOn(tracer, "trace");
|
|
||||||
|
|
||||||
parser.parse("b", { tracer: tracer });
|
parser.parse("b", { tracer: tracer });
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue