Skip to content

Commit 7621840

Browse files
committed
Formatting
1 parent e848907 commit 7621840

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

tests/utils/tensor.test.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ describe("Tensor operations", () => {
6969
});
7070

7171
it("should return a crop", async () => {
72-
const t1 = new Tensor("float32", Array.from({ length: 28 }, (_, i) => i + 1), [4, 7]);
72+
const t1 = new Tensor(
73+
"float32",
74+
Array.from({ length: 28 }, (_, i) => i + 1),
75+
[4, 7],
76+
);
7377
const t2 = t1.slice([1, -1], [1, -1]);
7478

7579
const target = new Tensor("float32", [9, 10, 11, 12, 13, 16, 17, 18, 19, 20], [2, 5]);

tests/utils/utils.test.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ describe("Utilities", () => {
6565
const [width, height, channels] = [2, 2, 3];
6666
const data = Uint8Array.from({ length: width * height * channels }, (_, i) => i % 5);
6767
const tiny_image = new RawImage(data, width, height, channels);
68-
68+
6969
let image;
7070
beforeAll(async () => {
7171
image = await RawImage.fromURL("https://picsum.photos/300/200");
7272
});
7373

7474
it("Can split image into separate channels", async () => {
75-
const image_data = tiny_image.split().map(x => x.data);
75+
const image_data = tiny_image.split().map((x) => x.data);
7676

7777
const target = [
7878
new Uint8Array([0, 3, 1, 4]), // Reds
@@ -84,7 +84,10 @@ describe("Utilities", () => {
8484
});
8585

8686
it("Can splits channels for grayscale", async () => {
87-
const image_data = tiny_image.grayscale().split().map(x => x.data);
87+
const image_data = tiny_image
88+
.grayscale()
89+
.split()
90+
.map((x) => x.data);
8891
const target = [new Uint8Array([1, 3, 2, 1])];
8992

9093
compare(image_data, target);

0 commit comments

Comments
 (0)