UNPKG

@apillon/sdk

Version:

▶◀ Apillon SDK for NodeJS ▶◀

28 lines 1.33 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const indexing_1 = require("../modules/indexing/indexing"); const helper_1 = require("./helpers/helper"); describe('Indexing tests', () => { let indexing; let indexer_uuid; beforeAll(async () => { indexing = new indexing_1.Indexing((0, helper_1.getConfig)()); indexer_uuid = (0, helper_1.getIndexerUUID)(); }); test('Deploy a indexer', async () => { const response = await indexing .indexer(indexer_uuid) .deployIndexer('D:\\Sqd\\moonbeam-squid'); expect(response).toBeDefined(); expect(response.lastDeploymentId).toBeTruthy(); expect(response.status).toBe(5); expect(response.deployment).toBeDefined(); }); test('Deploy a indexer with invalid path, should return error', async () => { await expect(indexing.indexer((0, helper_1.getIndexerUUID)()).deployIndexer('some invalid path')).rejects.toThrow('Path does not exist'); }); test('Deploy a indexer with valid path but invalid content, should return error', async () => { await expect(indexing.indexer((0, helper_1.getIndexerUUID)()).deployIndexer('D:\\Sqd')).rejects.toThrow('squid.yaml not found in directory'); }); }); //# sourceMappingURL=indexing.test.js.map