Skip to content

Commit

Permalink
fix: address comments to remove kathcases integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hui-an-yang committed Nov 22, 2022
1 parent db7ece5 commit 5a68628
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
16 changes: 1 addition & 15 deletions integration-tests/local-forging.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { CONFIGS } from "./config";
import { commonCases, kathmanduCases, limaCases } from './data/allTestsCases';
import { commonCases, limaCases } from './data/allTestsCases';
import { LocalForger, ProtocolsHash } from '@taquito/local-forging'
import { Protocols, TezosToolkit } from "@taquito/taquito";

CONFIGS().forEach(({ rpc, protocol }) => {
const Tezos = new TezosToolkit(rpc);
const kathmandunet = protocol === Protocols.PtKathman ? test: test.skip;
const limanetAndAlpha = protocol === Protocols.PtLimaPtL || protocol === Protocols.ProtoALpha ? test: test.skip;

describe(`Test local forger: ${rpc}`, () => {
Expand All @@ -25,19 +24,6 @@ CONFIGS().forEach(({ rpc, protocol }) => {
});
});

kathmanduCases.forEach(({ name, operation, expected }) => {
kathmandunet(`Should give the same result as when forging with the rpc: ${name} (${rpc})`, async done => {
const localForger = new LocalForger(protocol as unknown as ProtocolsHash);

const result = await localForger.forge(operation);
const rpcResult = await Tezos.rpc.forgeOperations(operation);
expect(result).toEqual(rpcResult);
expect(await localForger.parse(result)).toEqual(expected || operation);

done();
});
});

limaCases.forEach(({ name, operation, expected }) => {
limanetAndAlpha(`Should give the same result as when forging with the rpc: ${name} (${rpc})`, async done => {
const localForger = new LocalForger(protocol as unknown as ProtocolsHash);
Expand Down
11 changes: 0 additions & 11 deletions packages/taquito-local-forging/test/taquito-local-forging.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@ describe('Forge and parse operations default protocol', () => {
});
});

// describe('Forge and parse operations kathmandu protocol', () => {
// const localForger = new LocalForger();
// kathmanduCases.forEach(({ name, operation, expected }) => {
// test(`Common test: ${name}`, async (done) => {
// const result = await localForger.forge(operation);
// expect(await localForger.parse(result)).toEqual(expected || operation);
// done();
// });
// });
// });

describe('Forge should validate parameters against the schema', () => {
const hexToParse = `0572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e166a9d8cabc673a322fda673779d8e3822ba3ecb8670e461f73bb9021d5fd76a4c56d9d4cd16bd1bba86881979749d28`;

Expand Down

0 comments on commit 5a68628

Please sign in to comment.