npm package diff

Package: @forge/storage

Versions: 1.5.15-experimental-f6dcf26 - 1.5.15-experimental-204139e

File: package/out/entity-storage/__test__/transaction-api.test.js

Index: package/out/entity-storage/__test__/transaction-api.test.js
===================================================================
--- package/out/entity-storage/__test__/transaction-api.test.js
+++ package/out/entity-storage/__test__/transaction-api.test.js
@@ -0,0 +1,38 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const index_1 = require("../../index");
+const custom_entity_transaction_api_1 = require("../custom-entity-transaction-api");
+const contextAri = 'app-ari';
+const getStorage = (apiClientMock) => new index_1.GlobalStorage(() => contextAri, apiClientMock);
+const getApiClientMock = (response, statusCode = 200) => {
+    return jest.fn().mockReturnValue({
+        ok: statusCode === 200,
+        status: statusCode,
+        text: jest.fn().mockResolvedValue(JSON.stringify(response))
+    });
+};
+describe.skip('Transaction', () => {
+    it('Test', async () => {
+        const apiClientMock = getApiClientMock({
+            data: {
+                appStoredEntity: {
+                    value: 'testValue'
+                }
+            }
+        });
+        const globalStorage = getStorage(apiClientMock);
+        await new custom_entity_transaction_api_1.DefaultCustomEntityTransactionBuilder(globalStorage, 'users')
+            .set('user1', { name: 'anirudh' })
+            .andCondition('name', index_1.FilterConditions.beginsWith('An'))
+            .andCondition('age', index_1.FilterConditions.isLessThan(20))
+            .set('user2', { name: 'Shivam' })
+            .orCondition('name', index_1.FilterConditions.beginsWith('Si'))
+            .orCondition('type', index_1.FilterConditions.equalsTo('admin'))
+            .entity('projects')
+            .delete('FSQL-101')
+            .andCondition('type', index_1.FilterConditions.equalsTo('BUG'))
+            .set('ESS-2', { type: 'Story' })
+            .andCondition('name', index_1.FilterConditions.doesNotExist())
+            .execute();
+    });
+});