embark/dapps/tests/contracts/test/lib_test_spec.js
Michael Bradley b736ebefcd refactor: initial steps toward 5.0.0-alpha.0 (#1856)
BREAKING CHANGE:

There are more than several breaking changes, including DApp configuration for
accounts.
2019-08-30 16:50:20 -04:00

24 lines
462 B
JavaScript

/*global contract, config, it*/
const assert = require('assert');
const Test2 = require('Embark/contracts/Test2');
config({
contracts: {
deploy: {
"Test2": {},
"ZAMyLib": {},
"ZAMyLib2": {
"deploy": true
}
}
}
});
contract("Test", function() {
it("should call library correctly", async function() {
let result = await Test2.methods.testAdd().call();
assert.strictEqual(parseInt(result, 10), 3);
});
});