Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
Signed-off-by: lstocchi <[email protected]>
  • Loading branch information
lstocchi committed Jul 1, 2024
1 parent 1dcfc94 commit 282161b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/preferences.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,27 @@ test('should update configuration accordingly with params', async () => {
const updateConfigMock = vi.fn();
const apiConfig: extensionApi.Configuration = {
update: updateConfigMock,
get: function <T>(section: string): T {
get: function <T>(): T {
throw new Error('Function not implemented.');
},
has: function (section: string): boolean {
has: function (): boolean {
throw new Error('Function not implemented.');
}
},
};
const configuration: Configuration = {
cpus: 10,
memory: 286102,
'disk-size': 186,
'pull-secret-file': 'file',
preset: 'openshift'
preset: 'openshift',
};

vi.spyOn(daemon.commander, 'configGet').mockResolvedValue(configuration);
vi.spyOn(extensionApi.configuration, 'getConfiguration').mockReturnValue(apiConfig);

vi.spyOn(crcCli, 'getPreset').mockResolvedValue(undefined);

const configSetMock = vi.spyOn(daemon.commander, 'configSet').mockImplementation((_values: Configuration | {[key: string]: string | number;}) => {
const configSetMock = vi.spyOn(daemon.commander, 'configSet').mockImplementation(() => {
return Promise.resolve();
});
await preferences.saveConfig({
Expand Down

0 comments on commit 282161b

Please sign in to comment.