mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Prettier (an auto formatter) is set to only run within the tgui folder currently. This removes that limitation, allowing it to automatically format all supported files in the repo (.js, .html, .yml [etc](https://prettier.io/docs/)) I made a few exceptions for bundled and generated files I'm of the opinion that code should look uniform and am lazy enough to want CTRL-S to format files without having to think beyond that
63 lines
1.1 KiB
JavaScript
63 lines
1.1 KiB
JavaScript
import { strict as assert } from "assert";
|
|
import { createComment } from "./comment.js";
|
|
|
|
const baseServers = {
|
|
bagil: [
|
|
{
|
|
round_id: 1,
|
|
datetime: "2020-01-01 00:00:00",
|
|
server: "bagil",
|
|
url: "https://tgstation13.org/round/1",
|
|
},
|
|
],
|
|
};
|
|
|
|
const baseComment = createComment(
|
|
baseServers,
|
|
|
|
null,
|
|
);
|
|
|
|
assert.equal(
|
|
baseComment,
|
|
`<!-- test_merge_bot: 1 -->
|
|
This pull request was test merged in 1 round(s).
|
|
<details><summary>Round list</summary>
|
|
|
|
|
|
### bagil
|
|
- [1 @ 2020-01-01 00:00:00](https://tgstation13.org/round/1)
|
|
|
|
</details>
|
|
`,
|
|
);
|
|
|
|
assert.equal(createComment(baseServers, baseComment), null);
|
|
|
|
assert.equal(
|
|
createComment(
|
|
{
|
|
bagil: [
|
|
{
|
|
round_id: 2,
|
|
datetime: "2020-01-01 01:00:00",
|
|
server: "bagil",
|
|
url: "https://tgstation13.org/round/2",
|
|
},
|
|
],
|
|
},
|
|
baseComment,
|
|
),
|
|
`<!-- test_merge_bot: 1, 2 -->
|
|
This pull request was test merged in 2 round(s).
|
|
<details><summary>Round list</summary>
|
|
|
|
|
|
### bagil
|
|
- [2 @ 2020-01-01 01:00:00](https://tgstation13.org/round/2)
|
|
- [1 @ 2020-01-01 00:00:00](https://tgstation13.org/round/1)
|
|
|
|
</details>
|
|
`,
|
|
);
|