UNPKG

@cosmology/ast

Version:
101 lines (100 loc) 3.79 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.mutations = void 0; var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); var _testUtils = require("../../../test-utils"); var _helpers = require("./helpers"); var mutations = [{ methodName: 'joinPool', typeUrl: '/cosmos.pools.transfer.v1.MsgJoinPool', TypeName: 'MsgJoinPool' }, { methodName: 'exitPool', typeUrl: '/cosmos.pools.transfer.v1.MsgExitPool', TypeName: 'MsgExitPool' }]; exports.mutations = mutations; it('addEncodedMethod', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() { return _regenerator["default"].wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: (0, _testUtils.expectCode)((0, _helpers.addEncodedMethod)(mutations[0])); case 1: case "end": return _context.stop(); } }, _callee); }))); it('addFromPartialMethod', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() { return _regenerator["default"].wrap(function _callee2$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: (0, _testUtils.expectCode)((0, _helpers.addFromPartialMethod)(mutations[0])); case 1: case "end": return _context2.stop(); } }, _callee2); }))); it('addToJSONMethod', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() { return _regenerator["default"].wrap(function _callee3$(_context3) { while (1) switch (_context3.prev = _context3.next) { case 0: (0, _testUtils.expectCode)((0, _helpers.addToJSONMethod)(mutations[0])); case 1: case "end": return _context3.stop(); } }, _callee3); }))); it('addFromJSONMethod', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() { return _regenerator["default"].wrap(function _callee4$(_context4) { while (1) switch (_context4.prev = _context4.next) { case 0: (0, _testUtils.expectCode)((0, _helpers.addFromJSONMethod)(mutations[0])); case 1: case "end": return _context4.stop(); } }, _callee4); }))); it('addJsonMethod', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() { return _regenerator["default"].wrap(function _callee5$(_context5) { while (1) switch (_context5.prev = _context5.next) { case 0: (0, _testUtils.expectCode)((0, _helpers.addJsonMethod)(mutations[0])); case 1: case "end": return _context5.stop(); } }, _callee5); }))); it('createHelperObject', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() { var context; return _regenerator["default"].wrap(function _callee6$(_context6) { while (1) switch (_context6.prev = _context6.next) { case 0: context = (0, _testUtils.getGenericParseContext)(); // @ts-ignore context.ref = { proto: { "package": 'a.b.c', imports: [], root: {}, importNames: {} } }; (0, _testUtils.expectCode)((0, _helpers.createHelperObject)({ context: context, name: 'MessageComposer', mutations: mutations })); case 3: case "end": return _context6.stop(); } }, _callee6); })));