mirror of
https://github.com/status-im/web3.js.git
synced 2025-02-23 11:38:12 +00:00
* added sub packages * added lerna monopackage management * check for package is instance * added method, subscription and utils package * moved almost all packages * moved all packages, no umbrella package yet * added extend to packages * made contract pass * made batch tests pass * expose providers * fixed test async * fixed test errors * fixed test event encode decode * fixed test formatter tests * fixed method tests * fixed method utils * fixed some eth methods * fixed some eth methods 2 * bumped version 0.18.3 to republish meteor package * fixed get* tests * fixed subscribe tests * added newBlockHeaders subscription * remove unpublished package from package.json * added sendTransaction test * fixed call test * moved files to done * changed extend * added iban tests * Fixed ALL tests * Fixed lint tests * Fixed contract tests * added method tests * added more method tests to test promiEvents extensively * added confirmation event * improved method confirmation checking
27 lines
942 B
JavaScript
27 lines
942 B
JavaScript
var assert = require('assert');
|
|
var formatters = require('../packages/web3-core-helpers/src/formatters.js');
|
|
|
|
describe('formatters', function () {
|
|
describe('outputPostFormatter', function () {
|
|
it('should return the correct value', function () {
|
|
|
|
assert.deepEqual(formatters.outputPostFormatter({
|
|
expiry: '0x3e8',
|
|
sent: '0x3e8',
|
|
ttl: '0x3e8',
|
|
workProved: '0x3e8',
|
|
payload: '0x7b2274657374223a2274657374227d',
|
|
topics: ['0x68656c6c6f','0x6d79746f70696373']
|
|
}), {
|
|
expiry: 1000,
|
|
sent: 1000,
|
|
ttl: 1000,
|
|
workProved: 1000,
|
|
payload: '0x7b2274657374223a2274657374227d', //{test: 'test'},
|
|
// payloadRaw: '0x7b2274657374223a2274657374227d',
|
|
topics: ['hello','mytopics']
|
|
});
|
|
});
|
|
});
|
|
});
|