UNPKG

caver-js

Version:

caver-js is a JavaScript API library that allows developers to interact with a Kaia node

532 lines (496 loc) 30 kB
/* Copyright 2018 The caver-js Authors This file is part of the caver-js library. The caver-js library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The caver-js library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the caver-js. If not, see <http://www.gnu.org/licenses/>. */ const { expect } = require('./extendedChai') const Caver = require('../index') const testRPCURL = require('./testrpc') describe('caver.klay.abi.encodeContractDeploy', () => { it('CAVERJS-UNIT-SER-024 : Should be same with expected deploy input', () => { const caver = new Caver(testRPCURL) const abi1 = [ { constant: true, inputs: [], name: 'count', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: true, inputs: [], name: 'getBlockNumber', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: false, inputs: [{ name: '_count', type: 'uint256' }], name: 'setCount', outputs: [], payable: false, stateMutability: 'nonpayable', type: 'function', }, ] const bytecode1 = '0x60806040526000805534801561001457600080fd5b50610116806100246000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a7230582064856de85a2706463526593b08dd790054536042ef66d3204018e6790a2208d10029' const abi2 = [ { constant: true, inputs: [], name: 'count', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: true, inputs: [], name: 'getBlockNumber', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: false, inputs: [{ name: '_count', type: 'uint256' }], name: 'setCount', outputs: [], payable: false, stateMutability: 'nonpayable', type: 'function', }, { inputs: [{ name: '_a', type: 'uint256' }], payable: false, stateMutability: 'nonpayable', type: 'constructor' }, ] const bytecode2 = '0x60806040526000805534801561001457600080fd5b5060405160208061015d8339810180604052810190808051906020019092919050505050610116806100476000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a72305820ec774499bcdb89d9e570156a76249b33e99c766dfc6944e55aeeca316b41debf0029' const abi3 = [ { constant: true, inputs: [], name: 'count', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: true, inputs: [], name: 'getBlockNumber', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: false, inputs: [{ name: '_count', type: 'uint256' }], name: 'setCount', outputs: [], payable: false, stateMutability: 'nonpayable', type: 'function', }, { inputs: [{ name: '_a', type: 'uint256' }, { name: '_b', type: 'uint256' }], payable: false, stateMutability: 'nonpayable', type: 'constructor', }, ] const bytecode3 = '0x60806040526000805534801561001457600080fd5b5060405160408061016883398101806040528101908080519060200190929190805190602001909291905050505050610116806100526000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a72305820f85b40d5ad70d0b3599200515915dca3074bcf609f27660845ecbfe882d3eeee0029' const abi4 = [ { constant: true, inputs: [], name: 'count', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: true, inputs: [], name: 'getBlockNumber', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: false, inputs: [{ name: '_count', type: 'uint256' }], name: 'setCount', outputs: [], payable: false, stateMutability: 'nonpayable', type: 'function', }, { inputs: [{ name: '_a', type: 'string' }], payable: false, stateMutability: 'nonpayable', type: 'constructor' }, ] const bytecode4 = '0x60806040526000805534801561001457600080fd5b5060405161015d38038061015d8339810180604052810190808051820192919050505050610116806100476000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a7230582082c35290d5a3c5f9ae552e0f638388cdc57d596a0973febe5de8eb9ee6df48a60029' expect(caver.klay.abi.encodeContractDeploy(abi1, bytecode1)).to.equal( '0x60806040526000805534801561001457600080fd5b50610116806100246000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a7230582064856de85a2706463526593b08dd790054536042ef66d3204018e6790a2208d10029' ) expect(caver.klay.abi.encodeContractDeploy(abi2, bytecode2, 1)).to.equal( '0x60806040526000805534801561001457600080fd5b5060405160208061015d8339810180604052810190808051906020019092919050505050610116806100476000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a72305820ec774499bcdb89d9e570156a76249b33e99c766dfc6944e55aeeca316b41debf00290000000000000000000000000000000000000000000000000000000000000001' ) expect(caver.klay.abi.encodeContractDeploy(abi3, bytecode3, 1, 2)).to.equal( '0x60806040526000805534801561001457600080fd5b5060405160408061016883398101806040528101908080519060200190929190805190602001909291905050505050610116806100526000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a72305820f85b40d5ad70d0b3599200515915dca3074bcf609f27660845ecbfe882d3eeee002900000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002' ) expect(caver.klay.abi.encodeContractDeploy(abi4, bytecode4, 'satoshi')).to.equal( '0x60806040526000805534801561001457600080fd5b5060405161015d38038061015d8339810180604052810190808051820192919050505050610116806100476000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a7230582082c35290d5a3c5f9ae552e0f638388cdc57d596a0973febe5de8eb9ee6df48a60029000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000077361746f73686900000000000000000000000000000000000000000000000000' ) }) it('CAVERJS-UNIT-TX-002 : Should throw an error for invalid argument length', () => { const caver = new Caver(testRPCURL) const abi1 = [ { constant: true, inputs: [], name: 'count', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: true, inputs: [], name: 'getBlockNumber', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: false, inputs: [{ name: '_count', type: 'uint256' }], name: 'setCount', outputs: [], payable: false, stateMutability: 'nonpayable', type: 'function', }, { inputs: [{ name: '_a', type: 'uint256' }], payable: false, stateMutability: 'nonpayable', type: 'constructor' }, ] const bytecode1 = '0x60806040526000805534801561001457600080fd5b5060405160208061015d8339810180604052810190808051906020019092919050505050610116806100476000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a72305820ec774499bcdb89d9e570156a76249b33e99c766dfc6944e55aeeca316b41debf0029' const abi2 = [ { constant: true, inputs: [], name: 'count', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: true, inputs: [], name: 'getBlockNumber', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: false, inputs: [{ name: '_count', type: 'uint256' }], name: 'setCount', outputs: [], payable: false, stateMutability: 'nonpayable', type: 'function', }, { inputs: [{ name: '_a', type: 'uint256' }, { name: '_b', type: 'uint256' }], payable: false, stateMutability: 'nonpayable', type: 'constructor', }, ] const bytecode2 = '0x60806040526000805534801561001457600080fd5b5060405160408061016883398101806040528101908080519060200190929190805190602001909291905050505050610116806100526000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a72305820f85b40d5ad70d0b3599200515915dca3074bcf609f27660845ecbfe882d3eeee0029' const abi3 = [ { constant: true, inputs: [], name: 'count', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: true, inputs: [], name: 'getBlockNumber', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: false, inputs: [{ name: '_count', type: 'uint256' }], name: 'setCount', outputs: [], payable: false, stateMutability: 'nonpayable', type: 'function', }, { inputs: [{ name: '_a', type: 'string' }], payable: false, stateMutability: 'nonpayable', type: 'constructor' }, ] const bytecode3 = '0x60806040526000805534801561001457600080fd5b5060405161015d38038061015d8339810180604052810190808051820192919050505050610116806100476000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a7230582082c35290d5a3c5f9ae552e0f638388cdc57d596a0973febe5de8eb9ee6df48a60029' // Expected arguments length: 1, Actual: 0 expect(() => caver.klay.abi.encodeContractDeploy(abi1, bytecode1)).to.throw() // Expected arguments length: 2, Actual: 1 expect(() => caver.klay.abi.encodeContractDeploy(abi2, bytecode2, 1)).to.throw() // Expected arguments length: 1, Actual: 2 expect(() => caver.klay.abi.encodeContractDeploy(abi3, bytecode3, 'hello', 'world')).to.throw() }) it('CAVERJS-UNIT-TX-003 : Should throw an error for invalid argument type', () => { const caver = new Caver(testRPCURL) const abi1 = [ { constant: true, inputs: [], name: 'count', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: true, inputs: [], name: 'getBlockNumber', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: false, inputs: [{ name: '_count', type: 'uint256' }], name: 'setCount', outputs: [], payable: false, stateMutability: 'nonpayable', type: 'function', }, { inputs: [{ name: '_a', type: 'uint256' }], payable: false, stateMutability: 'nonpayable', type: 'constructor' }, ] const bytecode1 = '0x60806040526000805534801561001457600080fd5b5060405160208061015d8339810180604052810190808051906020019092919050505050610116806100476000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a72305820ec774499bcdb89d9e570156a76249b33e99c766dfc6944e55aeeca316b41debf0029' const abi2 = [ { constant: true, inputs: [], name: 'count', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: true, inputs: [], name: 'getBlockNumber', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: false, inputs: [{ name: '_count', type: 'uint256' }], name: 'setCount', outputs: [], payable: false, stateMutability: 'nonpayable', type: 'function', }, { inputs: [{ name: '_a', type: 'uint256' }, { name: '_b', type: 'uint256' }], payable: false, stateMutability: 'nonpayable', type: 'constructor', }, ] const bytecode2 = '0x60806040526000805534801561001457600080fd5b5060405160408061016883398101806040528101908080519060200190929190805190602001909291905050505050610116806100526000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a72305820f85b40d5ad70d0b3599200515915dca3074bcf609f27660845ecbfe882d3eeee0029' const abi3 = [ { constant: true, inputs: [], name: 'count', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: true, inputs: [], name: 'getBlockNumber', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: false, inputs: [{ name: '_count', type: 'uint256' }], name: 'setCount', outputs: [], payable: false, stateMutability: 'nonpayable', type: 'function', }, { inputs: [{ name: '_a', type: 'string' }], payable: false, stateMutability: 'nonpayable', type: 'constructor' }, ] const bytecode3 = '0x60806040526000805534801561001457600080fd5b5060405161015d38038061015d8339810180604052810190808051820192919050505050610116806100476000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a7230582082c35290d5a3c5f9ae552e0f638388cdc57d596a0973febe5de8eb9ee6df48a60029' // Expected arguments type: [uint256], Actual: [string] expect(() => caver.klay.abi.encodeContractDeploy(abi1, bytecode1, 'hello')).to.throw() // Expected arguments type: [uint256, uint256], Actual: [uint256, string] expect(() => caver.klay.abi.encodeContractDeploy(abi2, bytecode2, 1, 'hello')).to.throw() // Expected arguments type: [string], Actual: [uint256] expect(() => caver.klay.abi.encodeContractDeploy(abi3, bytecode3, 2)).to.throw() }) it('CAVERJS-UNIT-TX-004 : Should not throw an error for valid argument type', () => { const caver = new Caver(testRPCURL) const abi1 = [ { constant: true, inputs: [], name: 'count', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: true, inputs: [], name: 'getBlockNumber', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: false, inputs: [{ name: '_count', type: 'uint256' }], name: 'setCount', outputs: [], payable: false, stateMutability: 'nonpayable', type: 'function', }, { inputs: [{ name: '_a', type: 'uint256' }], payable: false, stateMutability: 'nonpayable', type: 'constructor' }, ] const bytecode1 = '0x60806040526000805534801561001457600080fd5b5060405160208061015d8339810180604052810190808051906020019092919050505050610116806100476000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a72305820ec774499bcdb89d9e570156a76249b33e99c766dfc6944e55aeeca316b41debf0029' const abi2 = [ { constant: true, inputs: [], name: 'count', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: true, inputs: [], name: 'getBlockNumber', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: false, inputs: [{ name: '_count', type: 'uint256' }], name: 'setCount', outputs: [], payable: false, stateMutability: 'nonpayable', type: 'function', }, { inputs: [{ name: '_a', type: 'uint256' }, { name: '_b', type: 'uint256' }], payable: false, stateMutability: 'nonpayable', type: 'constructor', }, ] const bytecode2 = '0x60806040526000805534801561001457600080fd5b5060405160408061016883398101806040528101908080519060200190929190805190602001909291905050505050610116806100526000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a72305820f85b40d5ad70d0b3599200515915dca3074bcf609f27660845ecbfe882d3eeee0029' const abi3 = [ { constant: true, inputs: [], name: 'count', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: true, inputs: [], name: 'getBlockNumber', outputs: [{ name: '', type: 'uint256' }], payable: false, stateMutability: 'view', type: 'function', }, { constant: false, inputs: [{ name: '_count', type: 'uint256' }], name: 'setCount', outputs: [], payable: false, stateMutability: 'nonpayable', type: 'function', }, { inputs: [{ name: '_a', type: 'string' }], payable: false, stateMutability: 'nonpayable', type: 'constructor' }, ] const bytecode3 = '0x60806040526000805534801561001457600080fd5b5060405161015d38038061015d8339810180604052810190808051820192919050505050610116806100476000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a7230582082c35290d5a3c5f9ae552e0f638388cdc57d596a0973febe5de8eb9ee6df48a60029' // Expected arguments type: [uint256], Actual: [uint256] expect(() => caver.klay.abi.encodeContractDeploy(abi1, bytecode1, 1)).not.to.throw() // // Expected arguments type: [uint256, uint256], Actual: [uint256, uint256] expect(() => caver.klay.abi.encodeContractDeploy(abi2, bytecode2, 1, 2)).not.to.throw() // Expected arguments type: [string], Actual: [string] expect(() => caver.klay.abi.encodeContractDeploy(abi3, bytecode3, 'hi')).not.to.throw() }) })