mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 14:34:40 +00:00
update tests
This commit is contained in:
parent
67dd4a22cb
commit
8999d619c5
@ -51,7 +51,8 @@ Test.prototype.deployAll = function(contractsConfig, cb) {
|
|||||||
|
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
function getConfig(callback) {
|
function getConfig(callback) {
|
||||||
self.engine.config.contractsConfig = {contracts: contractsConfig};
|
let _versions_default = self.engine.config.contractsConfig.versions;
|
||||||
|
self.engine.config.contractsConfig = {contracts: contractsConfig, versions: _versions_default};
|
||||||
callback();
|
callback();
|
||||||
},
|
},
|
||||||
function startServices(callback) {
|
function startServices(callback) {
|
||||||
|
@ -2,9 +2,13 @@
|
|||||||
let ContractsManager = require('../lib/contracts/contracts.js');
|
let ContractsManager = require('../lib/contracts/contracts.js');
|
||||||
let Logger = require('../lib/core/logger.js');
|
let Logger = require('../lib/core/logger.js');
|
||||||
let File = require('../lib/core/file.js');
|
let File = require('../lib/core/file.js');
|
||||||
|
let TestLogger = require('../lib/core/test_logger.js');
|
||||||
let assert = require('assert');
|
let assert = require('assert');
|
||||||
let fs = require('fs');
|
let fs = require('fs');
|
||||||
|
|
||||||
|
//let SolidityCompiler = require('../lib/modules/solidity');
|
||||||
|
let Plugins = require('../lib/core/plugins.js');
|
||||||
|
|
||||||
let readFile = function(file) {
|
let readFile = function(file) {
|
||||||
return new File({filename: file, type: 'dapp_file', path: file});
|
return new File({filename: file, type: 'dapp_file', path: file});
|
||||||
};
|
};
|
||||||
@ -12,7 +16,13 @@ let readFile = function(file) {
|
|||||||
describe('embark.Contracts', function() {
|
describe('embark.Contracts', function() {
|
||||||
this.timeout(0);
|
this.timeout(0);
|
||||||
describe('simple', function() {
|
describe('simple', function() {
|
||||||
|
let plugins = new Plugins({
|
||||||
|
logger: new TestLogger({})
|
||||||
|
});
|
||||||
|
plugins.loadInternalPlugin('Solidity', {solcVersion: '0.4.17', contractDirectories: ['app/contracts/']});
|
||||||
|
|
||||||
let contractsManager = new ContractsManager({
|
let contractsManager = new ContractsManager({
|
||||||
|
plugins: plugins,
|
||||||
contractFiles: [
|
contractFiles: [
|
||||||
readFile('test/contracts/simple_storage.sol'),
|
readFile('test/contracts/simple_storage.sol'),
|
||||||
readFile('test/contracts/token.sol')
|
readFile('test/contracts/token.sol')
|
||||||
@ -85,7 +95,13 @@ describe('embark.Contracts', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('config with contract instances', function() {
|
describe('config with contract instances', function() {
|
||||||
|
let plugins = new Plugins({
|
||||||
|
logger: new TestLogger({})
|
||||||
|
});
|
||||||
|
plugins.loadInternalPlugin('Solidity', {solcVersion: '0.4.17', contractDirectories: ['app/contracts/']});
|
||||||
|
|
||||||
let contractsManager = new ContractsManager({
|
let contractsManager = new ContractsManager({
|
||||||
|
plugins: plugins,
|
||||||
contractFiles: [
|
contractFiles: [
|
||||||
readFile('test/contracts/simple_storage.sol'),
|
readFile('test/contracts/simple_storage.sol'),
|
||||||
readFile('test/contracts/token_storage.sol')
|
readFile('test/contracts/token_storage.sol')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user