29 lines
735 B
TypeScript
29 lines
735 B
TypeScript
|
import { OptionReminder, splitTime } from "../../utils/reminder";
|
||
|
|
||
|
describe("Time splitter", () => {
|
||
|
{
|
||
|
const name = "";
|
||
|
test(name, () => {
|
||
|
expect(splitTime(name)).toStrictEqual({ option: OptionReminder.Nothing, time: "" });
|
||
|
});
|
||
|
}
|
||
|
{
|
||
|
const name = "2m@p";
|
||
|
test(name, () => {
|
||
|
expect(splitTime(name)).toStrictEqual({ option: OptionReminder.DirectMessage, time: "2m" });
|
||
|
});
|
||
|
}
|
||
|
{
|
||
|
const name = "41@";
|
||
|
test(name, () => {
|
||
|
expect(splitTime(name)).toStrictEqual({ option: OptionReminder.Mention, time: "41" });
|
||
|
});
|
||
|
}
|
||
|
{
|
||
|
const name = "0P";
|
||
|
test(name, () => {
|
||
|
expect(splitTime(name)).toStrictEqual({ option: OptionReminder.DirectMessage, time: "0" });
|
||
|
});
|
||
|
}
|
||
|
});
|