"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

var _MagicNumber = _interopRequireWildcard(require("./MagicNumber"));

// 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('MagicNumber', () => {
  it('succeeds when the magic number matches', () => {
    expect(() => new _MagicNumber.default(_MagicNumber.MAGIC_NUMBER)).not.toThrow();
  });
  it('fails when the magic number missmatches', () => {
    expect(() => new _MagicNumber.default(0x12345)).toThrow(/MagicNumber/);
  });
});