Skip to content

Commit b2b50f8

Browse files
committed
tests: make assertions sync, not async
1 parent d09e57e commit b2b50f8

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

test/test-vectors/assert.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
// Minimal assert version to avoid dependecies on node internals
22
// Allows to verify that none of brwoserify version of node internals is included in resulting build
3-
async function deepStrictEqual(
4-
actual: unknown,
5-
expected: unknown,
6-
message?: string
7-
) {
3+
function deepStrictEqual(actual: unknown, expected: unknown, message?: string) {
84
const [actualType, expectedType] = [typeof actual, typeof expected];
95
const err = new Error(
106
`Non-equal values: actual=${actual} (type=${actualType}) expected=${expected} (type=${expectedType})${
@@ -49,7 +45,7 @@ async function deepStrictEqual(
4945
if (actualType === "object") {
5046
const [actualKeys, expectedKeys] = [
5147
Object.keys(actual as object),
52-
Object.keys(expected as object)
48+
Object.keys(expected as object),
5349
];
5450
deepStrictEqual(actualKeys, expectedKeys, message);
5551
for (const key of actualKeys) {
@@ -60,7 +56,7 @@ async function deepStrictEqual(
6056
throw err;
6157
}
6258

63-
async function throws(cb: () => any) {
59+
function throws(cb: () => any) {
6460
try {
6561
cb();
6662
} catch (e) {

0 commit comments

Comments
 (0)