2018-08-04 21:25:29 +03:00
|
|
|
const wasm = require('wasm-bindgen-test.js');
|
2018-08-05 05:00:16 +03:00
|
|
|
const assert = require('assert');
|
2018-08-04 21:25:29 +03:00
|
|
|
|
2018-08-05 05:00:16 +03:00
|
|
|
exports.js_identity = a => a;
|
2018-08-04 21:25:29 +03:00
|
|
|
|
2018-08-05 05:00:16 +03:00
|
|
|
exports.js_works = () => {
|
|
|
|
assert.strictEqual(wasm.letter(), 'a');
|
|
|
|
assert.strictEqual(wasm.face(), '😀');
|
|
|
|
assert.strictEqual(wasm.rust_identity('Ղ'), 'Ղ');
|
|
|
|
assert.strictEqual(wasm.rust_identity('ҝ'), 'ҝ');
|
|
|
|
assert.strictEqual(wasm.rust_identity('Δ'), 'Δ');
|
|
|
|
assert.strictEqual(wasm.rust_identity('䉨'), '䉨');
|
|
|
|
assert.strictEqual(wasm.rust_js_identity('a'), 'a');
|
|
|
|
assert.strictEqual(wasm.rust_js_identity('㊻'), '㊻');
|
|
|
|
wasm.rust_letter('a');
|
|
|
|
wasm.rust_face('😀');
|
2018-08-04 21:25:29 +03:00
|
|
|
};
|