Add Prettier and ESLint tooling (Refs #77)
This commit is contained in:
@@ -17,7 +17,14 @@ describe('decodeRconError', () => {
|
||||
});
|
||||
|
||||
it('recognizes every known reason code', () => {
|
||||
for (const r of ['no-config', 'no-port', 'send-error', 'timeout', 'bad-reply', 'no-players'] as const) {
|
||||
for (const r of [
|
||||
'no-config',
|
||||
'no-port',
|
||||
'send-error',
|
||||
'timeout',
|
||||
'bad-reply',
|
||||
'no-players'
|
||||
] as const) {
|
||||
expect(decodeRconError(`${r}:whatever`)?.reason).toBe(r);
|
||||
}
|
||||
});
|
||||
@@ -33,7 +40,14 @@ describe('decodeRconError', () => {
|
||||
|
||||
describe('rconFixHint', () => {
|
||||
it('returns a non-empty hint for every failure reason', () => {
|
||||
for (const r of ['no-config', 'no-port', 'send-error', 'timeout', 'bad-reply', 'no-players'] as const) {
|
||||
for (const r of [
|
||||
'no-config',
|
||||
'no-port',
|
||||
'send-error',
|
||||
'timeout',
|
||||
'bad-reply',
|
||||
'no-players'
|
||||
] as const) {
|
||||
expect(rconFixHint(r).length).toBeGreaterThan(0);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user