Custom tracers specs: s/'/"/

The convention is to use single quotes only for strings containing code.
redux
David Majda 9 years ago
parent 1d38b973ee
commit a4b4a57569

@ -79,50 +79,50 @@ describe("generated parser API", function() {
parser.parse("b", { tracer: tracer }); parser.parse("b", { tracer: tracer });
expect(tracer.trace).toHaveBeenCalledWith({ expect(tracer.trace).toHaveBeenCalledWith({
type: 'rule.enter', type: "rule.enter",
rule: 'start', rule: "start",
location: { location: {
start: { offset: 0, line: 1, column: 1 }, start: { offset: 0, line: 1, column: 1 },
end: { offset: 0, line: 1, column: 1 } end: { offset: 0, line: 1, column: 1 }
} }
}); });
expect(tracer.trace).toHaveBeenCalledWith({ expect(tracer.trace).toHaveBeenCalledWith({
type: 'rule.enter', type: "rule.enter",
rule: 'a', rule: "a",
location: { location: {
start: { offset: 0, line: 1, column: 1 }, start: { offset: 0, line: 1, column: 1 },
end: { offset: 0, line: 1, column: 1 } end: { offset: 0, line: 1, column: 1 }
} }
}); });
expect(tracer.trace).toHaveBeenCalledWith({ expect(tracer.trace).toHaveBeenCalledWith({
type: 'rule.fail', type: "rule.fail",
rule: 'a', rule: "a",
location: { location: {
start: { offset: 0, line: 1, column: 1 }, start: { offset: 0, line: 1, column: 1 },
end: { offset: 0, line: 1, column: 1 } end: { offset: 0, line: 1, column: 1 }
} }
}); });
expect(tracer.trace).toHaveBeenCalledWith({ expect(tracer.trace).toHaveBeenCalledWith({
type: 'rule.enter', type: "rule.enter",
rule: 'b', rule: "b",
location: { location: {
start: { offset: 0, line: 1, column: 1 }, start: { offset: 0, line: 1, column: 1 },
end: { offset: 0, line: 1, column: 1 } end: { offset: 0, line: 1, column: 1 }
} }
}); });
expect(tracer.trace).toHaveBeenCalledWith({ expect(tracer.trace).toHaveBeenCalledWith({
type: 'rule.match', type: "rule.match",
rule: 'b', rule: "b",
result: 'b', result: "b",
location: { location: {
start: { offset: 0, line: 1, column: 1 }, start: { offset: 0, line: 1, column: 1 },
end: { offset: 1, line: 1, column: 2 } end: { offset: 1, line: 1, column: 2 }
} }
}); });
expect(tracer.trace).toHaveBeenCalledWith({ expect(tracer.trace).toHaveBeenCalledWith({
type: 'rule.match', type: "rule.match",
rule: 'start', rule: "start",
result: 'b', result: "b",
location: { location: {
start: { offset: 0, line: 1, column: 1 }, start: { offset: 0, line: 1, column: 1 },
end: { offset: 1, line: 1, column: 2 } end: { offset: 1, line: 1, column: 2 }

Loading…
Cancel
Save