MCPcopy Create free account
hub / github.com/ccxt/ccxt / testEncode

Function testEncode

js/src/test/base/test.encodeDecode.js:3–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import assert from 'assert';
2import ccxt from '../../../ccxt.js';
3function testEncode() {
4 const exchange = new ccxt.Exchange({
5 'id': 'sampleexchange',
6 });
7 const input = 'encode-test';
8 const encoded = exchange.encode(input);
9 const decoded = exchange.decode(encoded);
10 assert(decoded === input, 'decoded should be equal to input, got ' + decoded + ' instead of ' + input);
11}
12function testDecode() {
13 const exchange = new ccxt.Exchange({
14 'id': 'sampleexchange',

Callers 1

testEncodeDecodeFunction · 0.70

Calls 3

encodeMethod · 0.95
decodeMethod · 0.95
assertFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…