Fix ESLint errors in spec/api/plugin-api.spec.js

Fix the following errors:

   59:35  error  "options" is defined but never used  no-unused-vars
   91:11  error  "plugin" is defined but never used   no-unused-vars
  102:35  error  "options" is defined but never used  no-unused-vars
  128:35  error  "options" is defined but never used  no-unused-vars

Note that ESLint revealed a real problem where the test supposedly
verifying receiving options by a plugin didn't actually verify anything.
redux
David Majda 9 years ago
parent 47ac688ce9
commit 04f8b50f80

@ -56,7 +56,7 @@ describe("plugin API", function() {
it("receives configuration", function() {
var plugin = {
use: function(config, options) {
use: function(config) {
var i;
expect(config).toBeObject();
@ -87,19 +87,19 @@ describe("plugin API", function() {
});
it("receives options", function() {
var buildParserOptions = { foo: 42 },
plugin = {
var plugin = {
use: function(config, options) {
expect(options).toEqual(buildParserOptions);
}
};
},
buildParserOptions = { plugins: [plugin], foo: 42 };
PEG.buildParser(grammar, buildParserOptions);
});
it("can replace parser", function() {
var plugin = {
use: function(config, options) {
use: function(config) {
var parser = PEG.buildParser([
'start = .* {',
' return {',
@ -125,7 +125,7 @@ describe("plugin API", function() {
it("can change compiler passes", function() {
var plugin = {
use: function(config, options) {
use: function(config) {
var pass = function(ast) {
ast.code = '({ parse: function() { return 42; } })';
};

Loading…
Cancel
Save