@luvio/adapter-test-library 0.138.3 → 0.138.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,29 +2,29 @@ import type { AdapterFactory, NetworkAdapter, Snapshot } from '@luvio/engine';
2
2
  import { Luvio } from '@luvio/engine';
3
3
  import type { MockPayload } from './network';
4
4
  export declare function buildLuvioInstance(mockNetworkAdapter: NetworkAdapter): Luvio;
5
- declare type AdapterRoundtripTestParams<C, D> = AdapterNetworkRoundtripTestParams<C, D> | AdapterNetworkRoundtripWithLuvioTestParams<C, D> | AdapterCacheHitRoundtripTestParams<C, D>;
6
- declare type AdapterTest<C, D> = {
5
+ type AdapterRoundtripTestParams<C, D> = AdapterNetworkRoundtripTestParams<C, D> | AdapterNetworkRoundtripWithLuvioTestParams<C, D> | AdapterCacheHitRoundtripTestParams<C, D>;
6
+ type AdapterTest<C, D> = {
7
7
  adapterFactory: AdapterFactory<C, D>;
8
8
  adapterConfig: C;
9
9
  privateProperties?: string[];
10
10
  };
11
- declare type AdapterTestWithInjectedLuvio<C, D> = AdapterTest<C, D> & {
11
+ type AdapterTestWithInjectedLuvio<C, D> = AdapterTest<C, D> & {
12
12
  luvio: Luvio;
13
13
  expectedData: D;
14
14
  };
15
- declare type NetworkConfig = {
15
+ type NetworkConfig = {
16
16
  request: MockPayload['networkArgs'];
17
17
  response: any;
18
18
  };
19
- declare type AdapterNetworkRoundtripTestParams<C, D> = AdapterTest<C, D> & {
19
+ type AdapterNetworkRoundtripTestParams<C, D> = AdapterTest<C, D> & {
20
20
  type: 'network';
21
21
  network: NetworkConfig;
22
22
  expectedData?: D;
23
23
  };
24
- declare type AdapterNetworkRoundtripWithLuvioTestParams<C, D> = AdapterTestWithInjectedLuvio<C, D> & {
24
+ type AdapterNetworkRoundtripWithLuvioTestParams<C, D> = AdapterTestWithInjectedLuvio<C, D> & {
25
25
  type: 'injectedLuvioNetwork';
26
26
  };
27
- declare type AdapterCacheHitRoundtripTestParams<C, D> = AdapterTestWithInjectedLuvio<C, D> & {
27
+ type AdapterCacheHitRoundtripTestParams<C, D> = AdapterTestWithInjectedLuvio<C, D> & {
28
28
  type: 'cache';
29
29
  };
30
30
  export declare function testAdapterCompletesRoundtrip<C = any, D = any>(params: AdapterRoundtripTestParams<C, D>): Promise<Snapshot<D, unknown>>;
@@ -21,14 +21,14 @@ export declare function stripProperties(obj: {
21
21
  }, props: string[]): any;
22
22
  export declare function doesThrow(predicate: () => void): boolean;
23
23
  export declare function flushPromises(): Promise<unknown>;
24
- declare type MatcherResult = {
24
+ type MatcherResult = {
25
25
  pass: boolean;
26
26
  message: () => string;
27
27
  };
28
28
  export declare const customMatchers: {
29
- toEqualFulfilledSnapshotWithData: (snapshot: Snapshot<unknown, unknown>, expected: any, privateProperties?: string[] | undefined) => MatcherResult;
30
- toEqualStaleSnapshotWithData: (snapshot: Snapshot<unknown, unknown>, expected: any, privateProperties?: string[] | undefined) => MatcherResult;
31
- toEqualErrorSnapshot: (actual: Snapshot<unknown, unknown>, expectedStatus?: number | undefined) => MatcherResult;
29
+ toEqualFulfilledSnapshotWithData: (snapshot: Snapshot<unknown, unknown>, expected: any, privateProperties?: string[]) => MatcherResult;
30
+ toEqualStaleSnapshotWithData: (snapshot: Snapshot<unknown, unknown>, expected: any, privateProperties?: string[]) => MatcherResult;
31
+ toEqualErrorSnapshot: (actual: Snapshot<unknown, unknown>, expectedStatus?: number) => MatcherResult;
32
32
  toEqualOfflineErrorSnapshot: (actual: Snapshot<unknown, unknown>) => MatcherResult;
33
33
  toHaveBeenHitTimes: (mockNetworkAdapter: NetworkAdapter, expected: Number) => MatcherResult;
34
34
  toHaveBeenHitOnce: (mockNetworkAdapter: NetworkAdapter) => MatcherResult;
@@ -2,29 +2,29 @@ import type { AdapterFactory, NetworkAdapter, Snapshot } from '@luvio/engine';
2
2
  import { Luvio } from '@luvio/engine';
3
3
  import type { MockPayload } from './network';
4
4
  export declare function buildLuvioInstance(mockNetworkAdapter: NetworkAdapter): Luvio;
5
- declare type AdapterRoundtripTestParams<C, D> = AdapterNetworkRoundtripTestParams<C, D> | AdapterNetworkRoundtripWithLuvioTestParams<C, D> | AdapterCacheHitRoundtripTestParams<C, D>;
6
- declare type AdapterTest<C, D> = {
5
+ type AdapterRoundtripTestParams<C, D> = AdapterNetworkRoundtripTestParams<C, D> | AdapterNetworkRoundtripWithLuvioTestParams<C, D> | AdapterCacheHitRoundtripTestParams<C, D>;
6
+ type AdapterTest<C, D> = {
7
7
  adapterFactory: AdapterFactory<C, D>;
8
8
  adapterConfig: C;
9
9
  privateProperties?: string[];
10
10
  };
11
- declare type AdapterTestWithInjectedLuvio<C, D> = AdapterTest<C, D> & {
11
+ type AdapterTestWithInjectedLuvio<C, D> = AdapterTest<C, D> & {
12
12
  luvio: Luvio;
13
13
  expectedData: D;
14
14
  };
15
- declare type NetworkConfig = {
15
+ type NetworkConfig = {
16
16
  request: MockPayload['networkArgs'];
17
17
  response: any;
18
18
  };
19
- declare type AdapterNetworkRoundtripTestParams<C, D> = AdapterTest<C, D> & {
19
+ type AdapterNetworkRoundtripTestParams<C, D> = AdapterTest<C, D> & {
20
20
  type: 'network';
21
21
  network: NetworkConfig;
22
22
  expectedData?: D;
23
23
  };
24
- declare type AdapterNetworkRoundtripWithLuvioTestParams<C, D> = AdapterTestWithInjectedLuvio<C, D> & {
24
+ type AdapterNetworkRoundtripWithLuvioTestParams<C, D> = AdapterTestWithInjectedLuvio<C, D> & {
25
25
  type: 'injectedLuvioNetwork';
26
26
  };
27
- declare type AdapterCacheHitRoundtripTestParams<C, D> = AdapterTestWithInjectedLuvio<C, D> & {
27
+ type AdapterCacheHitRoundtripTestParams<C, D> = AdapterTestWithInjectedLuvio<C, D> & {
28
28
  type: 'cache';
29
29
  };
30
30
  export declare function testAdapterCompletesRoundtrip<C = any, D = any>(params: AdapterRoundtripTestParams<C, D>): Promise<Snapshot<D, unknown>>;
@@ -21,14 +21,14 @@ export declare function stripProperties(obj: {
21
21
  }, props: string[]): any;
22
22
  export declare function doesThrow(predicate: () => void): boolean;
23
23
  export declare function flushPromises(): Promise<unknown>;
24
- declare type MatcherResult = {
24
+ type MatcherResult = {
25
25
  pass: boolean;
26
26
  message: () => string;
27
27
  };
28
28
  export declare const customMatchers: {
29
- toEqualFulfilledSnapshotWithData: (snapshot: Snapshot<unknown, unknown>, expected: any, privateProperties?: string[] | undefined) => MatcherResult;
30
- toEqualStaleSnapshotWithData: (snapshot: Snapshot<unknown, unknown>, expected: any, privateProperties?: string[] | undefined) => MatcherResult;
31
- toEqualErrorSnapshot: (actual: Snapshot<unknown, unknown>, expectedStatus?: number | undefined) => MatcherResult;
29
+ toEqualFulfilledSnapshotWithData: (snapshot: Snapshot<unknown, unknown>, expected: any, privateProperties?: string[]) => MatcherResult;
30
+ toEqualStaleSnapshotWithData: (snapshot: Snapshot<unknown, unknown>, expected: any, privateProperties?: string[]) => MatcherResult;
31
+ toEqualErrorSnapshot: (actual: Snapshot<unknown, unknown>, expectedStatus?: number) => MatcherResult;
32
32
  toEqualOfflineErrorSnapshot: (actual: Snapshot<unknown, unknown>) => MatcherResult;
33
33
  toHaveBeenHitTimes: (mockNetworkAdapter: NetworkAdapter, expected: Number) => MatcherResult;
34
34
  toHaveBeenHitOnce: (mockNetworkAdapter: NetworkAdapter) => MatcherResult;
@@ -2,29 +2,29 @@ import type { AdapterFactory, NetworkAdapter, Snapshot } from '@luvio/engine';
2
2
  import { Luvio } from '@luvio/engine';
3
3
  import type { MockPayload } from './network';
4
4
  export declare function buildLuvioInstance(mockNetworkAdapter: NetworkAdapter): Luvio;
5
- declare type AdapterRoundtripTestParams<C, D> = AdapterNetworkRoundtripTestParams<C, D> | AdapterNetworkRoundtripWithLuvioTestParams<C, D> | AdapterCacheHitRoundtripTestParams<C, D>;
6
- declare type AdapterTest<C, D> = {
5
+ type AdapterRoundtripTestParams<C, D> = AdapterNetworkRoundtripTestParams<C, D> | AdapterNetworkRoundtripWithLuvioTestParams<C, D> | AdapterCacheHitRoundtripTestParams<C, D>;
6
+ type AdapterTest<C, D> = {
7
7
  adapterFactory: AdapterFactory<C, D>;
8
8
  adapterConfig: C;
9
9
  privateProperties?: string[];
10
10
  };
11
- declare type AdapterTestWithInjectedLuvio<C, D> = AdapterTest<C, D> & {
11
+ type AdapterTestWithInjectedLuvio<C, D> = AdapterTest<C, D> & {
12
12
  luvio: Luvio;
13
13
  expectedData: D;
14
14
  };
15
- declare type NetworkConfig = {
15
+ type NetworkConfig = {
16
16
  request: MockPayload['networkArgs'];
17
17
  response: any;
18
18
  };
19
- declare type AdapterNetworkRoundtripTestParams<C, D> = AdapterTest<C, D> & {
19
+ type AdapterNetworkRoundtripTestParams<C, D> = AdapterTest<C, D> & {
20
20
  type: 'network';
21
21
  network: NetworkConfig;
22
22
  expectedData?: D;
23
23
  };
24
- declare type AdapterNetworkRoundtripWithLuvioTestParams<C, D> = AdapterTestWithInjectedLuvio<C, D> & {
24
+ type AdapterNetworkRoundtripWithLuvioTestParams<C, D> = AdapterTestWithInjectedLuvio<C, D> & {
25
25
  type: 'injectedLuvioNetwork';
26
26
  };
27
- declare type AdapterCacheHitRoundtripTestParams<C, D> = AdapterTestWithInjectedLuvio<C, D> & {
27
+ type AdapterCacheHitRoundtripTestParams<C, D> = AdapterTestWithInjectedLuvio<C, D> & {
28
28
  type: 'cache';
29
29
  };
30
30
  export declare function testAdapterCompletesRoundtrip<C = any, D = any>(params: AdapterRoundtripTestParams<C, D>): Promise<Snapshot<D, unknown>>;
@@ -21,14 +21,14 @@ export declare function stripProperties(obj: {
21
21
  }, props: string[]): any;
22
22
  export declare function doesThrow(predicate: () => void): boolean;
23
23
  export declare function flushPromises(): Promise<unknown>;
24
- declare type MatcherResult = {
24
+ type MatcherResult = {
25
25
  pass: boolean;
26
26
  message: () => string;
27
27
  };
28
28
  export declare const customMatchers: {
29
- toEqualFulfilledSnapshotWithData: (snapshot: Snapshot<unknown, unknown>, expected: any, privateProperties?: string[] | undefined) => MatcherResult;
30
- toEqualStaleSnapshotWithData: (snapshot: Snapshot<unknown, unknown>, expected: any, privateProperties?: string[] | undefined) => MatcherResult;
31
- toEqualErrorSnapshot: (actual: Snapshot<unknown, unknown>, expectedStatus?: number | undefined) => MatcherResult;
29
+ toEqualFulfilledSnapshotWithData: (snapshot: Snapshot<unknown, unknown>, expected: any, privateProperties?: string[]) => MatcherResult;
30
+ toEqualStaleSnapshotWithData: (snapshot: Snapshot<unknown, unknown>, expected: any, privateProperties?: string[]) => MatcherResult;
31
+ toEqualErrorSnapshot: (actual: Snapshot<unknown, unknown>, expectedStatus?: number) => MatcherResult;
32
32
  toEqualOfflineErrorSnapshot: (actual: Snapshot<unknown, unknown>) => MatcherResult;
33
33
  toHaveBeenHitTimes: (mockNetworkAdapter: NetworkAdapter, expected: Number) => MatcherResult;
34
34
  toHaveBeenHitOnce: (mockNetworkAdapter: NetworkAdapter) => MatcherResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luvio/adapter-test-library",
3
- "version": "0.138.3",
3
+ "version": "0.138.4",
4
4
  "description": "Test library for luvio adapters",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,8 +21,8 @@
21
21
  "sinon": "^14.0.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@luvio/engine": "^0.138.3",
25
- "@luvio/environments": "^0.138.3",
24
+ "@luvio/engine": "^0.138.4",
25
+ "@luvio/environments": "^0.138.4",
26
26
  "@types/sinon": "^7.5.2"
27
27
  },
28
28
  "volta": {