From a5e271549e81080b0f39b5c111cb02ddb9f3ba9c Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Sat, 1 Jun 2024 10:29:45 +0700 Subject: [PATCH] Create contract.test.js --- contracts/contract1/test/contract.test.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 contracts/contract1/test/contract.test.js diff --git a/contracts/contract1/test/contract.test.js b/contracts/contract1/test/contract.test.js new file mode 100644 index 0000000..c7e6388 --- /dev/null +++ b/contracts/contract1/test/contract.test.js @@ -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); + }); + }); +});