Skip to content

Commit

Permalink
Create contract.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Jun 1, 2024
1 parent 5245686 commit a5e2715
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions contracts/contract1/test/contract.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const Contract1 = artifacts.require('Contract1');
const { expect } = require('chai');

describe('Contract1', function () {
let contract;

beforeEach(async function () {
contract = await Contract1.new();
});

describe('set()', function () {
it('should set the stored data', async function () {
await contract.set(42);
expect(await contract.get()).to.equal(42);
});
});
});

0 comments on commit a5e2715

Please sign in to comment.