I am new to blockchain and trying to learn blockchain using Etherium environment with ReactJS. For learning purpose, I am following below link:
https://www.dappuniversity.com/articles/blockchain-tutorial
Everthing is working as per expplained in above link till the test case executing step. When I run truffle test then codes compiled successfully but with 0 passing.
Below is my test case code written in reactJS:
const SocialNetwork = artifacts.require('./socialNetwork.sol')
require('chai').use(require('chai-as-promised')).should()
contract('SocialNetwork', (accounts) => {
let socialNetwork
before(async () => {
socialNetwork = await SocialNetwork.deployed()
})
describe('deployment', async () => {
it('has a name', async () => {
const name = await socialNetwork.name()
assert.equal(name, 'Dapp Social Network')
})
})
})
Below is the output after running truffle test:
truffle test
Using network 'development'.
Compiling your contracts...
===========================
> Compiling .srccontractsMigrations.sol
> Compiling .srccontractsSocialNetwork.sol
> Artifacts written to C:UsersasusAppDataLocalTemptest--26480-U15AuvrMpfHd
> Compiled successfully using:
- solc: 0.5.16+commit.9c3226ce.Emscripten.clang
0 passing (1ms)
I am not able to understand why my test case is not executing. What the issue is and what is causing this. Can someone please help to resolve this issue?