@luvio/adapter-test-library 0.142.3 → 0.142.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.
@@ -535,10 +535,16 @@ function buildLuvioInstance(mockNetworkAdapter) {
535
535
  async function testAdapterCompletesRoundtrip(params) {
536
536
  const adapterSetup = setupAdapter(params);
537
537
  const result = await callAdapter(adapterSetup, params);
538
- expect(result.data).toBeDefined();
539
- expect(result).toEqualFulfilledSnapshotWithData(params.type === 'network'
540
- ? params.expectedData || params.network.response
541
- : params.expectedData, params.privateProperties);
538
+ if (params.isError) {
539
+ expect(result.data).toBeUndefined();
540
+ expect(result).toEqualErrorSnapshot();
541
+ }
542
+ else {
543
+ expect(result.data).toBeDefined();
544
+ expect(result).toEqualFulfilledSnapshotWithData(params.type === 'network'
545
+ ? params.expectedData || params.network.response
546
+ : params.expectedData, params.privateProperties);
547
+ }
542
548
  return result;
543
549
  }
544
550
  function setupAdapter(params) {
@@ -7,6 +7,7 @@ type AdapterTest<C, D> = {
7
7
  adapterFactory: AdapterFactory<C, D>;
8
8
  adapterConfig: C;
9
9
  privateProperties?: string[];
10
+ isError?: boolean;
10
11
  };
11
12
  type AdapterTestWithInjectedLuvio<C, D> = AdapterTest<C, D> & {
12
13
  luvio: Luvio;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luvio/adapter-test-library",
3
- "version": "0.142.3",
3
+ "version": "0.142.4",
4
4
  "description": "Test library for luvio adapters",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,8 +28,8 @@
28
28
  "sinon": "^14.0.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@luvio/engine": "^0.142.3",
32
- "@luvio/environments": "^0.142.3",
31
+ "@luvio/engine": "^0.142.4",
32
+ "@luvio/environments": "^0.142.4",
33
33
  "@types/sinon": "^7.5.2"
34
34
  },
35
35
  "volta": {