Skip to content

Commit 1bfc2ee

Browse files
committed
Fix broken tests and remove syntax unsupported by Node 6
1 parent 1c210c2 commit 1bfc2ee

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
},
2020
"eslintConfig": {
2121
"extends": "@alhadis/eslint-config",
22-
"globals": {
23-
"assert": true
24-
}
22+
"globals": {"assert": true},
23+
"rules": {"prefer-object-spread": 0}
2524
},
2625
"scripts": {
2726
"lint": "npx eslint . && npx tslint *.ts",

test/terminators.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,6 @@ suite("Terminators", () => {
288288
options: {foo: ["1", "2", undefined]},
289289
argv: ["--foo", "4"],
290290
},
291-
}]) assert.deepEqual(getOpts(input, optdef, {...config, terminator}), expected);
291+
}]) assert.deepEqual(getOpts(input, optdef, Object.assign({}, config, {terminator})), expected);
292292
});
293293
});

test/undefined-options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ suite("Undefined options", () => {
5353
"--unknown",
5454
], {"--bar": ""}, {
5555
noUndefined: arg =>
56-
new ReferenceError(`Can't find switch named "${arg.replace(/^-+/, "")}"`),
56+
new ReferenceError("Can't find switch named `" + arg.replace(/^-+/, "") + "`"),
5757
}), ReferenceError, "Can't find switch named `unknown`");
5858
});
5959

0 commit comments

Comments
 (0)