Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mock for testing node client v1 #890

Merged
merged 1 commit into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clientlibs/libTesters/client-lib-tester-frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ The default is to have `any` as the type for the upgrade client. This is because
// There's probably a clever way to do this, but getting the right types automatically is tricky

// import { UpgradeClient } from 'upgrade_client_local';
// import { UpgradeClient } from 'upgrade_client_1_1_17';
// import { UpgradeClient } from 'upgrade_client_1_1_7';
// import { UpgradeClient } from 'upgrade_client_3_0_18';
// import { UpgradeClient } from 'upgrade_client_4_2_0';

Expand Down
133 changes: 122 additions & 11 deletions clientlibs/libTesters/client-lib-tester-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"@angular/router": "^14.1.0",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"upgrade_client_1_1_17": "npm:[email protected]",
"upgrade_client_1_1_7": "npm:[email protected]",
"upgrade_client_1_1_8": "npm:[email protected]",
"upgrade_client_3_0_18": "npm:[email protected]",
"upgrade_client_4_2_0": "npm:[email protected]",
"upgrade_types_1_0_5": "npm:[email protected]",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as UpgradeClient_Local from 'upgrade_client_local/dist/browser';
// import { UpgradeClient as UpgradeClient_Local } from 'upgrade_client_1_1_17';
import { UpgradeClient as UpgradeClient_1_1_17 } from 'upgrade_client_1_1_17';
// import { UpgradeClient as UpgradeClient_Local } from 'upgrade_client_1_1_7';
import { UpgradeClient as UpgradeClient_1_1_7 } from 'upgrade_client_1_1_7';
import * as UpgradeClient_1_1_8 from "upgrade_client_1_1_8/dist/browser"
import { UpgradeClient as UpgradeClient_3_0_18 } from 'upgrade_client_3_0_18';
import { UpgradeClient as UpgradeClient_4_2_0 } from 'upgrade_client_4_2_0';
import { MOCK_APP_NAMES } from '../../../shared/constants';
Expand All @@ -23,7 +24,12 @@ export const availableClientLibraries: ClientLibraryRef[] = [
{
version: '1.1.7',
language: 'ts',
client: UpgradeClient_1_1_17,
client: UpgradeClient_1_1_7,
},
{
version: '1.1.8',
language: 'ts',
client: UpgradeClient_1_1_8,
},
{
version: '3.0.18',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ClientAppHook, CodeLanguage, MockAppType, MockClientAppInterfaceModel }
// There's probably a clever way to do this, but getting the right types automatically is tricky

// import { UpgradeClient } from 'upgrade_client_local';
// import { UpgradeClient } from 'upgrade_client_1_1_17';
// import { UpgradeClient } from 'upgrade_client_1_1_7';
// import { UpgradeClient } from 'upgrade_client_3_0_18';
// import { UpgradeClient } from 'upgrade_client_4_2_0';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
// There's probably a clever way to do this, but getting the right types automatically is tricky

// import UpgradeClient from 'upgrade_client_local/dist/browser';
import { UpgradeClient } from 'upgrade_client_1_1_17';
// import { UpgradeClient } from 'upgrade_client_1_1_7';
import UpgradeClient from "upgrade_client_1_1_8/dist/browser"
// import { UpgradeClient } from 'upgrade_client_3_0_18';
// import { UpgradeClient } from 'upgrade_client_4_2_0';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
// There's probably a clever way to do this, but getting the right types automatically is tricky

// import UpgradeClient from 'upgrade_client_local/dist/browser';
// import { UpgradeClient } from 'upgrade_client_1_1_17';
// import { UpgradeClient } from 'upgrade_client_1_1_7';
import { UpgradeClient } from 'upgrade_client_3_0_18';
// import { UpgradeClient } from 'upgrade_client_4_2_0';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { CaliperEnvelope } from '../../../../../../types/src';
// There's probably a clever way to do this, but getting the right types automatically is tricky

// import UpgradeClient from 'upgrade_client_local/dist/browser';
// import { UpgradeClient } from 'upgrade_client_1_1_17';
// import { UpgradeClient } from 'upgrade_client_1_1_7';
// import { UpgradeClient } from 'upgrade_client_3_0_18';
import { UpgradeClient } from 'upgrade_client_4_2_0';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import { CaliperEnvelope } from '../../../../../../types/src';
// There's probably a clever way to do this, but getting the right types automatically is tricky

import UpgradeClient from 'upgrade_client_local/dist/browser';
// import { UpgradeClient } from 'upgrade_client_1_1_17';
// import { UpgradeClient } from 'upgrade_client_1_1_7';
// import * as UpgradeClient_1_1_8 from "upgrade_client_1_1_8/dist/browser"
// import { UpgradeClient } from 'upgrade_client_3_0_18';
// import { UpgradeClient } from 'upgrade_client_4_2_0';

Expand All @@ -30,8 +31,8 @@ export enum MARKED_DECISION_POINT_STATUS {
providedIn: 'root',
})
export class GeneralTestForVersion5Service extends AbstractMockAppService {
public override upgradeClient!: UpgradeClient;
// public upgradeClient: any;
// public override upgradeClient!: UpgradeClient;
public upgradeClient: any;

/******************* required metadata to describe the mock app and its callable hooks ********************/
public NAME = MOCK_APP_NAMES.GENERAL_TS_FRONTEND_5_0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
// There's probably a clever way to do this, but getting the right types automatically is tricky

// import UpgradeClient from 'upgrade_client_local/dist/browser';
import { UpgradeClient } from 'upgrade_client_1_1_17';
// import { UpgradeClient } from 'upgrade_client_1_1_7';
import UpgradeClient from "upgrade_client_1_1_8/dist/browser"
// import { UpgradeClient } from 'upgrade_client_3_0_18';
// import { UpgradeClient } from 'upgrade_client_4_2_0';

Expand Down
Loading