"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

require("../../injector");

var _static = _interopRequireDefault(require("../static"));

var _ = _interopRequireDefault(require(".."));

// Copyright 2017-2019 @polkadot/types authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
describe('toCallsOnly', () => {
  it('creates a calls-only version of the  metadata', () => {
    const stripped = new _.default(_static.default).asCallsOnly;
    console.error(JSON.stringify(stripped));
    expect(stripped).toBeDefined();
  });
  it('can serialize from the input', () => {
    const s1 = new _.default(_static.default).asCallsOnly.toU8a();
    const s2 = new _.default(s1).asCallsOnly.toU8a();
    expect(s1).toEqual(s2);
  });
});