Skip to content

Commit

Permalink
Upgrade prettier to v3 and reformat files
Browse files Browse the repository at this point in the history
  • Loading branch information
mantoni committed Dec 27, 2023
1 parent bcb67ce commit 424f343
Show file tree
Hide file tree
Showing 84 changed files with 961 additions and 953 deletions.
18 changes: 9 additions & 9 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ assert.match(
return "yeah";
},
},
"Yeah!"
"Yeah!",
); // Passes
```

Expand All @@ -340,7 +340,7 @@ assert.match(
return "yeah!";
},
},
/yeah/
/yeah/,
); // Passes
assert.match(234, /[a-z]/); // Fails
```
Expand All @@ -358,7 +358,7 @@ assert.match(
return "42";
},
},
42
42,
); // Passes
assert.match(234, 1234); // Fails
```
Expand Down Expand Up @@ -387,7 +387,7 @@ assert.match(
},
function () {
return true;
}
},
);

// Fails
Expand Down Expand Up @@ -417,7 +417,7 @@ assert.match(
},
{
name: "Chris",
}
},
);

// Fails
Expand Down Expand Up @@ -1328,23 +1328,23 @@ assert.exception(
function () {
throw new TypeError("Ooops!");
},
{ name: "TypeError" }
{ name: "TypeError" },
);

// Fails, wrong exception type
assert.exception(
function () {
throw new Error("Aww");
},
{ name: "TypeError" }
{ name: "TypeError" },
);

// Fails, wrong exception message
assert.exception(
function () {
throw new Error("Aww");
},
{ message: "Ooops!" }
{ message: "Ooops!" },
);

// Fails, wrong exception type
Expand All @@ -1358,7 +1358,7 @@ assert.exception(
}
return true;
},
"Type of exception is wrong!"
"Type of exception is wrong!",
); // with message to print, if test fails
```
Expand Down
8 changes: 4 additions & 4 deletions lib/assert-exception-unexpected-exception.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ describe("assert.exception unexpected exception", function () {
throw new Error("apple pie");
},
{ name: "TypeError" },
"Wow"
"Wow",
);
throw new Error("Expected to throw");
} catch (e) {
referee.assert.match(
e.message,
"Wow: Expected { name: 'TypeError' } but threw 'Error' ('apple pie')"
"Wow: Expected { name: 'TypeError' } but threw 'Error' ('apple pie')",
);
}
});
Expand All @@ -28,13 +28,13 @@ describe("assert.exception unexpected exception", function () {
throw new Error("apple pie");
},
{ name: "Error", message: "Aww" },
"Wow"
"Wow",
);
throw new Error("Expected to throw");
} catch (e) {
referee.assert.match(
e.message,
"Wow: Expected { name: 'Error', message: 'Aww' } but threw 'Error' ('apple pie')"
"Wow: Expected { name: 'Error', message: 'Aww' } but threw 'Error' ('apple pie')",
);
}
});
Expand Down
6 changes: 3 additions & 3 deletions lib/assert.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("assert", function () {
} catch (error) {
referee.assert.equals(
error.message,
"[assert] Expected to receive at least 1 argument(s)"
"[assert] Expected to receive at least 1 argument(s)",
);
}
});
Expand Down Expand Up @@ -51,7 +51,7 @@ describe("assert", function () {
function () {
referee.assert(false);
},
{ message: "[assert] Expected false to be truthy" }
{ message: "[assert] Expected false to be truthy" },
);
});

Expand Down Expand Up @@ -110,7 +110,7 @@ describe("assert", function () {
} catch (e) {
referee.assert.equals(
e.message,
"[assert] Expected to receive at least 1 argument(s)"
"[assert] Expected to receive at least 1 argument(s)",
);
}
});
Expand Down
60 changes: 30 additions & 30 deletions lib/assertions/class-name.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ describe("assert.className", function () {
assert.equal(error.code, "ERR_ASSERTION");
assert.equal(
error.message,
"[assert.className] Expected to receive at least 2 argument(s)"
"[assert.className] Expected to receive at least 2 argument(s)",
);
assert.equal(error.name, "AssertionError");
return true;
}
},
);
});

Expand All @@ -30,11 +30,11 @@ describe("assert.className", function () {
assert.equal(error.code, "ERR_ASSERTION");
assert.equal(
error.message,
"[assert.className] Expected to receive at least 2 argument(s)"
"[assert.className] Expected to receive at least 2 argument(s)",
);
assert.equal(error.name, "AssertionError");
return true;
}
},
);
});

Expand All @@ -47,12 +47,12 @@ describe("assert.className", function () {
assert.equal(error.code, "ERR_ASSERTION");
assert.equal(
error.message,
"[assert.className] Expected object to have className property"
"[assert.className] Expected object to have className property",
);
assert.equal(error.name, "AssertionError");
assert.equal(error.operator, "assert.className");
return true;
}
},
);
});

Expand All @@ -65,12 +65,12 @@ describe("assert.className", function () {
assert.equal(error.code, "ERR_ASSERTION");
assert.equal(
error.message,
"[assert.className] Nope: Expected object's className to include 'item' but was ''"
"[assert.className] Nope: Expected object's className to include 'item' but was ''",
);
assert.equal(error.name, "AssertionError");
assert.equal(error.operator, "assert.className");
return true;
}
},
);
});

Expand All @@ -91,12 +91,12 @@ describe("assert.className", function () {
assert.equal(error.code, "ERR_ASSERTION");
assert.equal(
error.message,
"[assert.className] Expected object's className to include 'item post' but was 'feed item'"
"[assert.className] Expected object's className to include 'item post' but was 'feed item'",
);
assert.equal(error.name, "AssertionError");
assert.equal(error.operator, "assert.className");
return true;
}
},
);
});

Expand Down Expand Up @@ -132,11 +132,11 @@ describe("refute.className", function () {
assert.equal(error.code, "ERR_ASSERTION");
assert.equal(
error.message,
"[refute.className] Expected to receive at least 2 argument(s)"
"[refute.className] Expected to receive at least 2 argument(s)",
);
assert.equal(error.name, "AssertionError");
return true;
}
},
);
});

Expand All @@ -149,11 +149,11 @@ describe("refute.className", function () {
assert.equal(error.code, "ERR_ASSERTION");
assert.equal(
error.message,
"[refute.className] Expected to receive at least 2 argument(s)"
"[refute.className] Expected to receive at least 2 argument(s)",
);
assert.equal(error.name, "AssertionError");
return true;
}
},
);
});

Expand All @@ -166,12 +166,12 @@ describe("refute.className", function () {
assert.equal(error.code, "ERR_ASSERTION");
assert.equal(
error.message,
"[refute.className] Expected object to have className property"
"[refute.className] Expected object to have className property",
);
assert.equal(error.name, "AssertionError");
assert.equal(error.operator, "refute.className");
return true;
}
},
);
});

Expand All @@ -184,12 +184,12 @@ describe("refute.className", function () {
assert.equal(error.code, "ERR_ASSERTION");
assert.equal(
error.message,
"[refute.className] Nope: Expected object to have className property"
"[refute.className] Nope: Expected object to have className property",
);
assert.equal(error.name, "AssertionError");
assert.equal(error.operator, "refute.className");
return true;
}
},
);
});

Expand All @@ -206,11 +206,11 @@ describe("refute.className", function () {
assert.equal(error.code, "ERR_ASSERTION");
assert.equal(
error.message,
"[refute.className] Expected object's className not to include 'item'"
"[refute.className] Expected object's className not to include 'item'",
);
assert.equal(error.name, "AssertionError");
return true;
}
},
);
});

Expand All @@ -225,11 +225,11 @@ describe("refute.className", function () {
assert.equal(error.code, "ERR_ASSERTION");
assert.equal(
error.message,
`[refute.className] ${message}: Expected object's className not to include 'item'`
`[refute.className] ${message}: Expected object's className not to include 'item'`,
);
assert.equal(error.name, "AssertionError");
return true;
}
},
);
});

Expand All @@ -242,11 +242,11 @@ describe("refute.className", function () {
assert.equal(error.code, "ERR_ASSERTION");
assert.equal(
error.message,
"[refute.className] Expected object's className not to include 'item'"
"[refute.className] Expected object's className not to include 'item'",
);
assert.equal(error.name, "AssertionError");
return true;
}
},
);
});

Expand All @@ -263,11 +263,11 @@ describe("refute.className", function () {
assert.equal(error.code, "ERR_ASSERTION");
assert.equal(
error.message,
"[refute.className] Expected object's className not to include 'item post'"
"[refute.className] Expected object's className not to include 'item post'",
);
assert.equal(error.name, "AssertionError");
return true;
}
},
);
});

Expand All @@ -280,11 +280,11 @@ describe("refute.className", function () {
assert.equal(error.code, "ERR_ASSERTION");
assert.equal(
error.message,
"[refute.className] Expected object's className not to include 'e a d'"
"[refute.className] Expected object's className not to include 'e a d'",
);
assert.equal(error.name, "AssertionError");
return true;
}
},
);
});

Expand All @@ -297,11 +297,11 @@ describe("refute.className", function () {
assert.equal(error.code, "ERR_ASSERTION");
assert.equal(
error.message,
"[refute.className] Expected object's className not to include [ 'e', 'a', 'd' ]"
"[refute.className] Expected object's className not to include [ 'e', 'a', 'd' ]",
);
assert.equal(error.name, "AssertionError");
return true;
}
},
);
});

Expand Down
Loading

0 comments on commit 424f343

Please sign in to comment.