mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-09 13:26:10 +00:00
6e9635c12b
* refactor(@embark/dapps/tests/app): use function syntax These changes don't fix the race conditions related to the test dapp's tests but are a step in the right direction. * refactor(@embark/dapps/tests/contracts): adjustments to get tests passing Further refactoring is needed re: potentially duplicated or overlapping logic in `packages/plugins/solidity-tests` and `packages/core/utils/src/solidity/remapImports.ts`, as well in disabled test dapp tests * test(dapps/tests/app): temporarily disable intermittently failing tests They are failing because of a race condition; once that race condition has been fixed these tests should be reenabled. * fix(@embark/solidity-tests): fix importing the library for the tests
42 lines
1.0 KiB
JavaScript
42 lines
1.0 KiB
JavaScript
/*global contract, config, it*/
|
|
const assert = require('assert');
|
|
const AnotherStorage = require('Embark/contracts/AnotherStorage');
|
|
const SimpleStorage = require('Embark/contracts/SimpleStorage');
|
|
let accounts;
|
|
|
|
config({
|
|
namesystem: {
|
|
enabled: true
|
|
},
|
|
contracts: {
|
|
deploy: {
|
|
"SimpleStorage": {
|
|
args: [100]
|
|
},
|
|
// "AnotherStorage": {
|
|
// args: ["$SimpleStorage", "embark.eth"]
|
|
// },
|
|
"AnotherStorage": {
|
|
args: ["$SimpleStorage", "$SimpleStorage"]
|
|
}
|
|
}
|
|
}
|
|
}, (err, accs) => {
|
|
accounts = accs;
|
|
});
|
|
|
|
contract("AnotherStorage", function() {
|
|
this.timeout(0);
|
|
|
|
it("set SimpleStorage address", async function() {
|
|
const result = await AnotherStorage.methods.simpleStorageAddress().call();
|
|
assert.equal(result.toString(), SimpleStorage.options.address);
|
|
});
|
|
|
|
// FIXME add back when the ENS feature is back
|
|
xit("set ENS address", async function() {
|
|
const result = await AnotherStorage.methods.ens().call();
|
|
assert.equal(result.toString(), accounts[0]);
|
|
});
|
|
});
|