⬆️ update prettier
This commit is contained in:
@@ -8,7 +8,7 @@ import { getPathToPose } from "@snk/solver/getPathToPose";
|
||||
import type { Options as DrawOptions } from "@snk/draw/drawWorld";
|
||||
|
||||
let snake = createSnakeFromCells(
|
||||
Array.from({ length: 4 }, (_, i) => ({ x: i, y: -1 }))
|
||||
Array.from({ length: 4 }, (_, i) => ({ x: i, y: -1 })),
|
||||
);
|
||||
|
||||
// const chain = [snake];
|
||||
@@ -55,7 +55,7 @@ const animationOptions: AnimationOptions = { frameDuration: 100, step: 1 };
|
||||
null,
|
||||
chainL,
|
||||
drawOptions,
|
||||
animationOptions
|
||||
animationOptions,
|
||||
);
|
||||
stats.push(performance.now() - s);
|
||||
}
|
||||
@@ -73,12 +73,12 @@ const animationOptions: AnimationOptions = { frameDuration: 100, step: 1 };
|
||||
})}ms`,
|
||||
"",
|
||||
].join("\n"),
|
||||
stats
|
||||
stats,
|
||||
);
|
||||
|
||||
fs.writeFileSync(
|
||||
`__tests__/__snapshots__/benchmark-output-${length}.gif`,
|
||||
buffer!
|
||||
buffer!,
|
||||
);
|
||||
}
|
||||
})();
|
||||
|
||||
@@ -46,14 +46,14 @@ for (const key of [
|
||||
null,
|
||||
chain,
|
||||
drawOptions,
|
||||
animationOptions
|
||||
animationOptions,
|
||||
);
|
||||
|
||||
expect(gif).toBeDefined();
|
||||
|
||||
fs.writeFileSync(path.resolve(dir, key + ".gif"), gif);
|
||||
},
|
||||
{ timeout: 20 * 1000 }
|
||||
{ timeout: 20 * 1000 },
|
||||
);
|
||||
|
||||
it(
|
||||
@@ -61,7 +61,7 @@ it(
|
||||
async () => {
|
||||
const grid = grids.smallFull;
|
||||
let snk = createSnakeFromCells(
|
||||
Array.from({ length: 6 }, (_, i) => ({ x: i, y: -1 }))
|
||||
Array.from({ length: 6 }, (_, i) => ({ x: i, y: -1 })),
|
||||
);
|
||||
|
||||
const chain = [snk];
|
||||
@@ -80,12 +80,12 @@ it(
|
||||
null,
|
||||
chain,
|
||||
drawOptions,
|
||||
animationOptions
|
||||
animationOptions,
|
||||
);
|
||||
|
||||
expect(gif).toBeDefined();
|
||||
|
||||
fs.writeFileSync(path.resolve(dir, "swipper.gif"), gif);
|
||||
},
|
||||
{ timeout: 20 * 1000 }
|
||||
{ timeout: 20 * 1000 },
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user