Skip to content

Commit

Permalink
testCommand: Replace SerenityOS emoji with more standard emoji
Browse files Browse the repository at this point in the history
Use the same emoji used by the test262 runner script for now.
  • Loading branch information
trflynn89 authored and awesomekling committed Jul 9, 2024
1 parent 24cf2d5 commit b9ad52e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 25 deletions.
35 changes: 11 additions & 24 deletions src/commands/testCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,7 @@

import { EmbedBuilder, ChatInputCommandInteraction, SlashCommandBuilder, Client } from "discord.js";
import axios from "axios";
import {
getBuggiemagnify,
getBuggus,
getLibjs,
getMakemore,
getNeoyak,
getPoggie,
getSadCaret,
getSkeleyak,
getYak,
getYakslice,
getYaksplode,
getYakstack,
} from "@/util/emoji";
import { getLadybird, getMakemore, getSadCaret } from "@/util/emoji";
import Command from "./command";
import githubAPI from "@/apis/githubAPI";

Expand Down Expand Up @@ -155,25 +142,25 @@ export class TestCommand extends Command {
case "total":
return "πŸ§ͺ";
case "passed":
return (await getPoggie(client))?.toString() ?? label;
return "βœ…";
case "failed":
return (await getYak(client))?.toString() ?? label;
return "❌";
case "skipped":
return (await getBuggiemagnify(client))?.toString() ?? label;
return "⚠️";
case "metadata_error":
return (await getBuggus(client))?.toString() ?? label;
return "πŸ“„";
case "harness_error":
return (await getYakslice(client))?.toString() ?? label;
return "βš™οΈ";
case "timeout_error":
return (await getSkeleyak(client))?.toString() ?? label;
return "πŸ’€";
case "process_error":
return (await getYaksplode(client))?.toString() ?? label;
return "πŸ’₯️";
case "runner_exception":
return (await getNeoyak(client))?.toString() ?? label;
return "🐍";
case "todo_error":
return (await getYakstack(client))?.toString() ?? label;
return "πŸ“";
case "percentage_passing":
return (await getLibjs(client))?.toString() ?? label;
return (await getLadybird(client))?.toString() ?? label;
default:
return label;
}
Expand Down
7 changes: 6 additions & 1 deletion src/util/emoji.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, the SerenityOS & Ladybird developers.
* Copyright (c) 2021-2024, the SerenityOS & Ladybird developers.
* Copyright (c) 2024, versecafe
*
* SPDX-License-Identifier: BSD-2-Clause
Expand Down Expand Up @@ -85,6 +85,11 @@ export async function getNeoyak(clientOrParent: ClientOrParent): Promise<Emoji |
return await getEmoji(clientOrParent, "neoyak");
}

/** Alias function for the :ladybird: emoji */
export async function getLadybird(clientOrParent: ClientOrParent): Promise<Emoji | null> {
return await getEmoji(clientOrParent, "ladybird");
}

/** Alias function for the :libjs: emoji */
export async function getLibjs(clientOrParent: ClientOrParent): Promise<Emoji | null> {
return await getEmoji(clientOrParent, "libjs");
Expand Down

0 comments on commit b9ad52e

Please sign in to comment.