Skip to content

Commit

Permalink
Fix broken tests and remove syntax unsupported by Node 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Alhadis committed Feb 25, 2019
1 parent 1c210c2 commit 1bfc2ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
},
"eslintConfig": {
"extends": "@alhadis/eslint-config",
"globals": {
"assert": true
}
"globals": {"assert": true},
"rules": {"prefer-object-spread": 0}
},
"scripts": {
"lint": "npx eslint . && npx tslint *.ts",
Expand Down
2 changes: 1 addition & 1 deletion test/terminators.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,6 @@ suite("Terminators", () => {
options: {foo: ["1", "2", undefined]},
argv: ["--foo", "4"],
},
}]) assert.deepEqual(getOpts(input, optdef, {...config, terminator}), expected);
}]) assert.deepEqual(getOpts(input, optdef, Object.assign({}, config, {terminator})), expected);
});
});
2 changes: 1 addition & 1 deletion test/undefined-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ suite("Undefined options", () => {
"--unknown",
], {"--bar": ""}, {
noUndefined: arg =>
new ReferenceError(`Can't find switch named "${arg.replace(/^-+/, "")}"`),
new ReferenceError("Can't find switch named `" + arg.replace(/^-+/, "") + "`"),
}), ReferenceError, "Can't find switch named `unknown`");
});

Expand Down

0 comments on commit 1bfc2ee

Please sign in to comment.