-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from dragonrealms-phoenix/develop
chore(deps): update dependencies
- Loading branch information
Showing
42 changed files
with
3,263 additions
and
2,405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,20 @@ | ||
import type { Mocked } from 'vitest'; | ||
import { vi } from 'vitest'; | ||
import type { AccountService } from '../types.js'; | ||
|
||
export class AccountServiceMockImpl implements AccountService { | ||
export class AccountServiceMockImpl implements Mocked<AccountService> { | ||
constructorSpy = vi.fn(); | ||
|
||
constructor(...args: Array<any>) { | ||
this.constructorSpy(args); | ||
} | ||
|
||
listAccounts = vi.fn< | ||
Parameters<AccountService['listAccounts']>, | ||
ReturnType<AccountService['listAccounts']> | ||
>(); | ||
|
||
getAccount = vi.fn< | ||
Parameters<AccountService['getAccount']>, | ||
ReturnType<AccountService['getAccount']> | ||
>(); | ||
|
||
saveAccount = vi.fn< | ||
Parameters<AccountService['saveAccount']>, | ||
ReturnType<AccountService['saveAccount']> | ||
>(); | ||
|
||
removeAccount = vi.fn< | ||
Parameters<AccountService['removeAccount']>, | ||
ReturnType<AccountService['removeAccount']> | ||
>(); | ||
|
||
listCharacters = vi.fn< | ||
Parameters<AccountService['listCharacters']>, | ||
ReturnType<AccountService['listCharacters']> | ||
>(); | ||
|
||
getCharacter = vi.fn< | ||
Parameters<AccountService['getCharacter']>, | ||
ReturnType<AccountService['getCharacter']> | ||
>(); | ||
|
||
saveCharacter = vi.fn< | ||
Parameters<AccountService['saveCharacter']>, | ||
ReturnType<AccountService['saveCharacter']> | ||
>(); | ||
|
||
removeCharacter = vi.fn< | ||
Parameters<AccountService['removeCharacter']>, | ||
ReturnType<AccountService['removeCharacter']> | ||
>(); | ||
listAccounts = vi.fn<AccountService['listAccounts']>(); | ||
getAccount = vi.fn<AccountService['getAccount']>(); | ||
saveAccount = vi.fn<AccountService['saveAccount']>(); | ||
removeAccount = vi.fn<AccountService['removeAccount']>(); | ||
listCharacters = vi.fn<AccountService['listCharacters']>(); | ||
getCharacter = vi.fn<AccountService['getCharacter']>(); | ||
saveCharacter = vi.fn<AccountService['saveCharacter']>(); | ||
removeCharacter = vi.fn<AccountService['removeCharacter']>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import type { Mocked } from 'vitest'; | ||
import { vi } from 'vitest'; | ||
import type { Maybe } from '../../../common/types.js'; | ||
import type { CacheService } from '../types.js'; | ||
|
||
export class CacheServiceMock implements Mocked<CacheService> { | ||
set = vi.fn(); | ||
get = vi.fn(); | ||
remove = vi.fn(); | ||
clear = vi.fn(); | ||
readCache = vi.fn(); | ||
writeCache = vi.fn(); | ||
set = vi.fn<CacheService['set']>(); | ||
get = vi.fn<(key: string) => Promise<Maybe<any>>>(); | ||
remove = vi.fn<CacheService['remove']>(); | ||
clear = vi.fn<CacheService['clear']>(); | ||
readCache = vi.fn<CacheService['readCache']>(); | ||
writeCache = vi.fn<CacheService['writeCache']>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import type { Mocked } from 'vitest'; | ||
import { vi } from 'vitest'; | ||
import type { GameParser } from '../types.js'; | ||
|
||
export class GameParserMockImpl implements Mocked<GameParser> { | ||
constructorSpy = vi.fn(); | ||
|
||
constructor(...args: Array<any>) { | ||
this.constructorSpy(args); | ||
} | ||
|
||
parse = vi.fn<GameParser['parse']>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,16 @@ | ||
import type { Mocked } from 'vitest'; | ||
import { vi } from 'vitest'; | ||
import type { GameService } from '../types.js'; | ||
|
||
export class GameServiceMockImpl implements GameService { | ||
export class GameServiceMockImpl implements Mocked<GameService> { | ||
constructorSpy = vi.fn(); | ||
|
||
constructor(...args: Array<any>) { | ||
this.constructorSpy(args); | ||
} | ||
|
||
isConnected = vi.fn<[], boolean>(); | ||
|
||
connect = vi.fn< | ||
Parameters<GameService['connect']>, | ||
ReturnType<GameService['connect']> | ||
>(); | ||
|
||
disconnect = vi.fn< | ||
Parameters<GameService['disconnect']>, | ||
ReturnType<GameService['disconnect']> | ||
>(); | ||
|
||
send = vi.fn< | ||
Parameters<GameService['send']>, | ||
ReturnType<GameService['send']> | ||
>(); | ||
isConnected = vi.fn<GameService['isConnected']>(); | ||
connect = vi.fn<GameService['connect']>(); | ||
disconnect = vi.fn<GameService['disconnect']>(); | ||
send = vi.fn<GameService['send']>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { Mocked } from 'vitest'; | ||
import { vi } from 'vitest'; | ||
import type { GameSocket } from '../types.js'; | ||
|
||
export class GameSocketMockImpl implements Mocked<GameSocket> { | ||
constructorSpy = vi.fn(); | ||
|
||
constructor(...args: Array<any>) { | ||
this.constructorSpy(args); | ||
} | ||
|
||
isConnected = vi.fn<GameSocket['isConnected']>(); | ||
connect = vi.fn<GameSocket['connect']>(); | ||
disconnect = vi.fn<GameSocket['disconnect']>(); | ||
send = vi.fn<GameSocket['send']>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.