mirror of
https://github.com/Instadapp/Swap-Aggregator-Subgraph.git
synced 2024-07-29 21:57:12 +00:00
17 lines
483 B
JavaScript
17 lines
483 B
JavaScript
'use strict'
|
|
|
|
var tape = require('tape')
|
|
var protobuf = require('../')
|
|
var UTF8 = protobuf(require('./test.proto')).UTF8
|
|
|
|
tape('strings can be utf-8', function (t) {
|
|
var ex = {
|
|
foo: 'ビッグデータ「人間の解釈が必要」「量の問題ではない」論と、もう一つのビッグデータ「人間の解釈が必要」「量の問題ではない」論と、もう一つの',
|
|
bar: 42
|
|
}
|
|
var b1 = UTF8.encode(ex)
|
|
|
|
t.same(UTF8.decode(b1), ex)
|
|
t.end()
|
|
})
|