Skip to content

Commit 89420d3

Browse files
Merge pull request #116 from bitbybit-dev/test-mig
update to unit tests and all package dependencies
2 parents eed51d2 + ee151ff commit 89420d3

32 files changed

+56945
-54504
lines changed

packages/dev/babylonjs/package-lock.json

Lines changed: 2186 additions & 2333 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/dev/babylonjs/package.json

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,20 @@
6464
"earcut": "2.2.3"
6565
},
6666
"devDependencies": {
67-
"@babel/core": "7.16.0",
68-
"@babel/preset-env": "7.16.0",
69-
"@babel/preset-typescript": "7.16.0",
70-
"@testing-library/jest-dom": "5.14.1",
71-
"@types/jest": "29.0.0",
72-
"babel-jest": "29.0.0",
73-
"jest": "29.4.1",
74-
"jest-environment-jsdom": "^30.2.0",
75-
"jest-html-reporters": "3.0.11",
76-
"mvdir": "1.0.21",
77-
"sass": "1.57.1",
67+
"@babel/core": "7.28.6",
68+
"@babel/preset-env": "7.28.6",
69+
"@babel/preset-typescript": "7.28.5",
70+
"@testing-library/jest-dom": "6.9.1",
71+
"@types/jest": "30.0.0",
72+
"babel-jest": "30.2.0",
73+
"jest": "30.2.0",
74+
"jest-environment-jsdom": "30.2.0",
75+
"jest-html-reporters": "3.1.7",
76+
"mvdir": "1.0.22",
7877
"shx": "0.4.0",
79-
"ts-jest": "29.0.0",
80-
"ts-node": "10.9.1",
81-
"typescript": "4.8.2"
78+
"ts-jest": "29.4.6",
79+
"ts-node": "10.9.2",
80+
"typescript": "5.9.3"
8281
},
8382
"jest": {
8483
"preset": "ts-jest",

packages/dev/base/lib/api/services/lists.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe("Lists unit tests", () => {
5454
});
5555

5656
it("should get out of bound error when getting item from the list", () => {
57-
expect(() => lists.getItem({ list: [0, 1, 2], index: 3 })).toThrowError("Index out of bounds");
57+
expect(() => lists.getItem({ list: [0, 1, 2], index: 3 })).toThrow("Index out of bounds");
5858
});
5959

6060
it("should get sublist from the list", () => {
@@ -184,7 +184,7 @@ describe("Lists unit tests", () => {
184184
});
185185

186186
it("should throw when flipping the list with different lengths", () => {
187-
expect(() => lists.flipLists({ list: [[0, 1, 2], [3, 4]] })).toThrowError("Lists are not of the same length");
187+
expect(() => lists.flipLists({ list: [[0, 1, 2], [3, 4]] })).toThrow("Lists are not of the same length");
188188
});
189189

190190
it("should multiply the item", () => {
@@ -203,7 +203,7 @@ describe("Lists unit tests", () => {
203203
});
204204

205205
it("should not flip empty list", () => {
206-
expect(() => lists.flipLists({ list: [] })).toThrowError("List is empty");
206+
expect(() => lists.flipLists({ list: [] })).toThrow("List is empty");
207207
});
208208

209209
it("should add item to the beginning of the list", () => {
@@ -312,11 +312,11 @@ describe("Lists unit tests", () => {
312312
});
313313

314314
it("should not add items to list at indexes if the number of items is not the same as indexes", () => {
315-
expect(() => lists.addItemsAtIndexes({ list: [0, 1, 2], indexes: [0, 3], items: [3, 4, 5] })).toThrowError("Items and indexes must have the same length");
315+
expect(() => lists.addItemsAtIndexes({ list: [0, 1, 2], indexes: [0, 3], items: [3, 4, 5] })).toThrow("Items and indexes must have the same length");
316316
});
317317

318318
it("should not add items to list at indexes if the indexes are not in ascending order", () => {
319-
expect(() => lists.addItemsAtIndexes({ list: [0, 1, 2], indexes: [3, 0], items: [3, 4] })).toThrowError("Indexes must be in ascending order");
319+
expect(() => lists.addItemsAtIndexes({ list: [0, 1, 2], indexes: [3, 0], items: [3, 4] })).toThrow("Indexes must be in ascending order");
320320
});
321321

322322
it("should remove item from list at index", () => {
@@ -499,11 +499,11 @@ describe("Lists unit tests", () => {
499499
});
500500

501501
it("should not get the elements by following the empty pattern", () => {
502-
expect(() => lists.getByPattern({ list: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], pattern: [] })).toThrowError("Pattern is empty or does not exist");
502+
expect(() => lists.getByPattern({ list: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], pattern: [] })).toThrow("Pattern is empty or does not exist");
503503
});
504504

505505
it("should not get the elements by following the empty pattern", () => {
506-
expect(() => lists.getByPattern({ list: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], pattern: undefined })).toThrowError("Pattern is empty or does not exist");
506+
expect(() => lists.getByPattern({ list: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], pattern: undefined })).toThrow("Pattern is empty or does not exist");
507507
});
508508

509509
it("should get list length", () => {
@@ -619,7 +619,7 @@ describe("Lists unit tests", () => {
619619
});
620620

621621
it("should throw error when getting first item from empty list", () => {
622-
expect(() => lists.getFirstItem({ list: [] })).toThrowError("List is empty");
622+
expect(() => lists.getFirstItem({ list: [] })).toThrow("List is empty");
623623
});
624624

625625
it("should get last item from the list", () => {
@@ -633,7 +633,7 @@ describe("Lists unit tests", () => {
633633
});
634634

635635
it("should throw error when getting last item from empty list", () => {
636-
expect(() => lists.getLastItem({ list: [] })).toThrowError("List is empty");
636+
expect(() => lists.getLastItem({ list: [] })).toThrow("List is empty");
637637
});
638638

639639
it("should remove first item from the list", () => {
@@ -821,7 +821,7 @@ describe("Lists unit tests", () => {
821821
});
822822

823823
it("should throw error when interleaving with no lists", () => {
824-
expect(() => lists.interleave({ lists: [] })).toThrowError("Lists array is empty or does not exist");
824+
expect(() => lists.interleave({ lists: [] })).toThrow("Lists array is empty or does not exist");
825825
});
826826

827827
it("should interleave string lists", () => {

0 commit comments

Comments
 (0)