fix(Faces): Escape backslash in Shrug (#10156)

* fix(Faces): Escape backslash in `Shrug`

* Update formatters.ts

* Update formatters.ts

* Update formatters.test.ts
This commit is contained in:
cobalt
2024-02-27 11:23:31 -06:00
committed by GitHub
parent efa3cac6f2
commit 0f9017ef95
2 changed files with 3 additions and 8 deletions

View File

@@ -314,12 +314,9 @@ describe('Message formatters', () => {
});
describe('Faces', () => {
// prettier-ignore
/* eslint-disable no-useless-escape */
test('GIVEN Faces.Shrug THEN returns "¯\_(ツ)_/¯"', () => {
expect<'¯\_(ツ)_/¯'>(Faces.Shrug).toEqual('¯\_(ツ)_/¯');
test('GIVEN Faces.Shrug THEN returns "¯\\_(ツ)_/¯"', () => {
expect<'¯\\_(ツ)_/¯'>(Faces.Shrug).toEqual('¯\\_(ツ)_/¯');
});
/* eslint-enable no-useless-escape */
test('GIVEN Faces.Tableflip THEN returns "(╯°□°)╯︵ ┻━┻"', () => {
expect<'(╯°□°)╯︵ ┻━┻'>(Faces.Tableflip).toEqual('(╯°□°)╯︵ ┻━┻');

View File

@@ -675,7 +675,6 @@ export const TimestampStyles = {
*/
export type TimestampStylesString = (typeof TimestampStyles)[keyof typeof TimestampStyles];
// prettier-ignore
/**
* All the available faces from Discord's native slash commands.
*/
@@ -683,8 +682,7 @@ export enum Faces {
/**
* `¯\_(ツ)_/¯`
*/
// eslint-disable-next-line no-useless-escape
Shrug = '¯\_(ツ)_/¯',
Shrug = '¯\\_(ツ)_/¯',
/**
* `(╯°□°)╯︵ ┻━┻`