Skip to content

Commit

Permalink
add await
Browse files Browse the repository at this point in the history
  • Loading branch information
Brean0 committed Aug 14, 2024
1 parent 84562ce commit 6b3752f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions protocol/test/hardhat/Field.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,28 +351,28 @@ describe("newField", function () {

describe("complex DPD", async function () {
it("Does not set thisSowTime if Soil > 1", async function () {
mockBeanstalk.setSoilE(to6("3"));
await mockBeanstalk.setSoilE(to6("3"));
await beanstalk.connect(user).sow(to6("1"), 0, EXTERNAL);
const weather = await beanstalk.weather();
expect(weather.thisSowTime).to.be.equal(parseInt(MAX_UINT32));
});

it("Does set thisSowTime if Soil = 1", async function () {
mockBeanstalk.setSoilE(to6("1"));
await mockBeanstalk.setSoilE(to6("1"));
await beanstalk.connect(user).sow(to6("1"), 0, EXTERNAL);
const weather = await beanstalk.weather();
expect(weather.thisSowTime).to.be.not.equal(parseInt(MAX_UINT32));
});

it("Does set thisSowTime if Soil < 1", async function () {
mockBeanstalk.setSoilE(to6("1.5"));
await mockBeanstalk.setSoilE(to6("1.5"));
await beanstalk.connect(user).sow(to6("1"), 0, EXTERNAL);
const weather = await beanstalk.weather();
expect(weather.thisSowTime).to.be.not.equal(parseInt(MAX_UINT32));
});

it("Does not set thisSowTime if Soil already < 1", async function () {
mockBeanstalk.setSoilE(to6("1.5"));
await mockBeanstalk.setSoilE(to6("1.5"));
await beanstalk.connect(user).sow(to6("1"), 0, EXTERNAL);
const weather = await beanstalk.weather();
await beanstalk.connect(user).sow(to6("0.5"), 0, EXTERNAL);
Expand Down

0 comments on commit 6b3752f

Please sign in to comment.