We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdd8c15 commit c4610d2Copy full SHA for c4610d2
test/version.test.js
@@ -35,19 +35,14 @@ describe("Test versions", function() {
35
})
36
).toThrow(new Error("Bad version number : x.y.z"));
37
});
38
- it("unhandled version", function() {
+ it.each([
39
+ ["unhandled version 4.9", "4.9"],
40
+ ["unhandled version 8.9", "8.9"],
41
+ ["unhandled version -0.9", "-0.9"]
42
+ ])("%s", function(_, version) {
43
expect(
44
parser.create.bind(null, {
- parser: {
- version: "4.9"
- }
- })
45
- ).toThrow(new Error("Can only handle versions between 5.x to 7.x"));
46
- expect(
47
- parser.create.bind(null, {
48
49
- version: "8.9"
50
+ parser: { version }
51
52
).toThrow(new Error("Can only handle versions between 5.x to 7.x"));
53
0 commit comments