Skip to content

Commit 9eab9a8

Browse files
committed
[skip ci] migrate 02.05
1 parent 9c48849 commit 9eab9a8

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

src/migrated/02.05-mock-object-id.failing.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ const mockObjectId = (data) => {
99
};
1010

1111
test("toString() returns right value", () => {
12-
assert.deepEqual(mockObjectId("foo").toString(), "foo");
12+
assert.equal(mockObjectId("foo").toString(), "foo");
1313
});
1414
test("it’s an object", () => {
1515
const actual = mockObjectId("foo");
16-
assert.deepEqual(typeof actual, "object");
16+
assert.equal(typeof actual, "object");
1717
});
1818
test("two objectIds with same value are equal", () => {
1919
const first = mockObjectId("foo");
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import { test } from "node:test";
2+
import assert from "node:assert/strict";
3+
14
const mockObjectId = (data) => {
25
const oid = {
36
name: data,
@@ -9,14 +12,14 @@ const mockObjectId = (data) => {
912
};
1013

1114
test("toString() returns right value", () => {
12-
expect(mockObjectId("foo").toString()).toEqual("foo");
15+
assert.equal(mockObjectId("foo").toString(), "foo");
1316
});
1417
test("it’s an object", () => {
1518
const actual = mockObjectId("foo");
16-
expect(typeof actual).toEqual("object");
19+
assert.equal(typeof actual, "object");
1720
});
1821
test("two objectIds with same value are equal", () => {
1922
const first = mockObjectId("foo");
2023
const second = mockObjectId("foo");
21-
expect(first).toEqual(second);
24+
assert.deepEqual(first, second);
2225
});

0 commit comments

Comments
 (0)