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

24 lines
466 B
JavaScript
Raw Normal View History

/*global artifacts, contract, config, it*/
2018-06-01 17:44:30 +00:00
const assert = require('assert');
const Test2 = artifacts.require('Test2');
2018-01-05 20:10:47 +00:00
2018-06-01 17:44:30 +00:00
config({
contracts: {
deploy: {
"Test2": {},
"ZAMyLib": {},
"ZAMyLib2": {
"deploy": true
}
2018-06-01 17:44:30 +00:00
}
}
});
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
});
});