update to embark 3.1

This commit is contained in:
Iuri Matias 2018-07-08 12:23:36 +03:00
parent cd57cd650a
commit 8e831f510f
9 changed files with 58 additions and 38 deletions

16
contracts.js Normal file
View File

@ -0,0 +1,16 @@
module.exports = {
default: {
deployment: {
host: "localhost",
port: 8545,
type: "rpc"
},
dappConnection: [
"$WEB3",
"http://localhost:8545"
],
gas: "auto",
contracts: {
}
}
};

View File

@ -1,16 +0,0 @@
{
"default": {
"deployment": {
"host": "localhost",
"port": 8545,
"type": "rpc"
},
"dappConnection": [
"$WEB3",
"http://localhost:8545"
],
"gas": "auto",
"contracts": {
}
}
}

View File

@ -3,7 +3,7 @@
"app": {}, "app": {},
"buildDir": "build/", "buildDir": "build/",
"config": { "config": {
"contracts": "contracts.json", "contracts": "contracts.js",
"blockchain": false, "blockchain": false,
"storage": false, "storage": false,
"communication": false, "communication": false,

View File

@ -10,6 +10,6 @@
"homepage": "", "homepage": "",
"requires": true, "requires": true,
"devDependencies": { "devDependencies": {
"embark": "^3.0.6" "embark": "^3.1.5"
} }
} }

View File

@ -6,12 +6,16 @@
*/ */
var testdata = require('../data/BrainFuck.json'); var testdata = require('../data/BrainFuck.json');
const BrainFuck = require('Embark/contracts/BrainFuck');
describe("BrainFuck", function() { config({
contracts: {
BrainFuck: {}
}
});
contract("BrainFuck", function() {
this.timeout(0); this.timeout(0);
before(function(done) {
EmbarkSpec.deployAll({"BrainFuck": {}}, () => { done() });
});
testdata.vectors.forEach(function(v, i) { testdata.vectors.forEach(function(v, i) {
it("Passes test vector " + i, async function() { it("Passes test vector " + i, async function() {

View File

@ -6,12 +6,16 @@
*/ */
var testdata = require('../data/HexDecoder.json'); var testdata = require('../data/HexDecoder.json');
const HexDecoder = require('Embark/contracts/HexDecoder');
describe("HexDecoder", function() { config({
contracts: {
HexDecoder: {}
}
});
contract("HexDecoder", function() {
this.timeout(0); this.timeout(0);
before(function(done) {
EmbarkSpec.deployAll({"HexDecoder": {}}, () => { done() });
});
testdata.vectors.forEach(function(v, i) { testdata.vectors.forEach(function(v, i) {
it("Passes test vector " + i, async function() { it("Passes test vector " + i, async function() {

View File

@ -6,12 +6,16 @@
*/ */
var testdata = require('../data/IndexOf.json'); var testdata = require('../data/IndexOf.json');
const IndexOf = require('Embark/contracts/IndexOf');
describe("IndexOf", function() { config({
contracts: {
IndexOf: {}
}
});
contract("IndexOf", function() {
this.timeout(0); this.timeout(0);
before(function(done) {
EmbarkSpec.deployAll({"IndexOf": {}}, () => { done() });
});
testdata.vectors.forEach(function(v, i) { testdata.vectors.forEach(function(v, i) {
it("Passes test vector " + i, async function() { it("Passes test vector " + i, async function() {

View File

@ -6,12 +6,16 @@
*/ */
var testdata = require('../data/Sort.json'); var testdata = require('../data/Sort.json');
const Sort = require('Embark/contracts/Sort');
describe("Sort", function() { config({
contracts: {
Sort: {}
}
});
contract("Sort", function() {
this.timeout(0); this.timeout(0);
before(function(done) {
EmbarkSpec.deployAll({"Sort": {}}, () => { done() });
});
testdata.vectors.forEach(function(v, i) { testdata.vectors.forEach(function(v, i) {
it("Passes test vector " + i, async function() { it("Passes test vector " + i, async function() {

View File

@ -6,12 +6,16 @@
*/ */
var testdata = require('../data/Unique.json'); var testdata = require('../data/Unique.json');
const Unique = require('Embark/contracts/Unique');
describe("Unique", function() { config({
contracts: {
Unique: {}
}
});
contract("Unique", function() {
this.timeout(0); this.timeout(0);
before(function(done) {
EmbarkSpec.deployAll({"Unique": {}}, () => { done() });
});
testdata.vectors.forEach(function(v, i) { testdata.vectors.forEach(function(v, i) {
it("Passes test vector " + i, async function() { it("Passes test vector " + i, async function() {