embark/dapps/tests/contracts/test/lib_test_spec.js

24 lines
442 B
JavaScript
Raw Permalink Normal View History

2018-06-07 20:14:42 +00:00
/*global contract, config, it*/
2018-06-01 17:44:30 +00:00
const assert = require('assert');
2018-06-07 20:14:42 +00:00
const Test2 = require('Embark/contracts/Test2');
2018-01-05 20:10:47 +00:00
2018-06-01 17:44:30 +00:00
config({
contracts: {
"Test2": {
},
"ZAMyLib": {
},
"ZAMyLib2": {
"deploy": true
}
}
});
2017-12-27 13:37:39 +00:00
2018-06-01 17:44:30 +00:00
contract("Test", function() {
2018-04-17 18:48:31 +00:00
it("should call library correctly", async function() {
let result = await Test2.methods.testAdd().call();
2018-06-01 17:44:30 +00:00
assert.strictEqual(parseInt(result, 10), 3);
2017-12-27 13:37:39 +00:00
});
});