@divyanshugupta/

EthereumApp

Nodejs

A node.js app for compiling,testing and depolying a smart contract on a test network(or any network on ethereum blockchain)

fork
loading
Files
  • index.js
  • contracts
  • test
  • compile.js
  • package.json

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.5303493326404929","path":"index.js","file":{"path":"index.js","content":{"asEncoding":{"base64":"Ci8vY29uc3QgY29tcGlsZT0gcmVxdWlyZSgnLi9jb21waWxlLmpzJyk7CgovL1VuaXQgdGVzdGluZyB3aXRoIE1vY2hhIHVzaW5nIGphdmFzY3JpcHQgQVBJCmNvbnN0IE1vY2hhID0gcmVxdWlyZSgnbW9jaGEnKTsKCmNvbnN0IHJ1bm5lciA9IG5ldyBNb2NoYSh7fSk7CgpydW5uZXIuYWRkRmlsZSgnLi90ZXN0L0luYm94LnRlc3QuanMnKTsKCnJ1bm5lci5ydW4oZmFpbHVyZXMgPT4gewogIGlmIChmYWlsdXJlcykgewogICAgY29uc29sZS5lcnJvcihmYWlsdXJlcyk7CiAgfSBlbHNlIHsKICAgIGNvbnNvbGUubG9nKCdBbGwgcGFzc2VkLicpOwogIH0KfSk="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//const compile= require('./compile.js');

//Unit testing with Mocha using javascript API
const Mocha = require('mocha');

const runner = new Mocha({});

runner.addFile('./test/Inbox.test.js');

runner.run(failures => {
  if (failures) {
    console.error(failures);
  } else {
    console.log('All passed.');
  }
})
node v10.16.0