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

Function testDecode

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

Source from the content-addressed store, hash-verified

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',
15 });
16 const input = 'decode-test';
17 const encoded = exchange.encode(input);
18 const decoded = exchange.decode(encoded);
19 assert(decoded === input, 'decoded should be equal to input, got ' + decoded + ' instead of ' + input);
20}
21function testEncodeDecode() {
22 testEncode();
23 testDecode();

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…