Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

Commit 84a7854

Browse files
authored
refactor
1 parent bdccca1 commit 84a7854

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ const sign = async (addresses, values) => {
4747
return { v, r, s }
4848
}
4949

50-
test('scheduled rewards', async t => {
50+
suite('scheduled rewards', () => {
5151
// Tests rely on the state created by each other. This is a shortcut and
5252
// should eventually be improved.
5353

54-
await t.test('empty scheduled rewards', async t => {
54+
test('empty scheduled rewards', async t => {
5555
{
5656
const res = await fetch(`${api}/scheduled-rewards`)
5757
assert.deepEqual(await res.json(), {})
@@ -61,7 +61,7 @@ test('scheduled rewards', async t => {
6161
assert.deepEqual(await res.json(), [])
6262
}
6363
})
64-
await t.test('ignore burner address', async t => {
64+
test('ignore burner address', async t => {
6565
{
6666
const participants = ['0x000000000000000000000000000000000000dEaD']
6767
const scores = ['100']
@@ -86,7 +86,7 @@ test('scheduled rewards', async t => {
8686
assert.deepEqual(log, [])
8787
}
8888
})
89-
await t.test('set scores', async t => {
89+
test('set scores', async t => {
9090
{
9191
const participants = [
9292
'0x000000000000000000000000000000000000dEa2',
@@ -139,7 +139,7 @@ test('scheduled rewards', async t => {
139139
])
140140
}
141141
})
142-
await t.test('increase scores', async t => {
142+
test('increase scores', async t => {
143143
{
144144
const participants = ['0x000000000000000000000000000000000000dEa2']
145145
const scores = ['10']
@@ -189,7 +189,7 @@ test('scheduled rewards', async t => {
189189
])
190190
}
191191
})
192-
await t.test('paid rewards', async t => {
192+
test('paid rewards', async t => {
193193
{
194194
const participants = ['0x000000000000000000000000000000000000dEa2']
195195
const rewards = ['9132']
@@ -243,8 +243,8 @@ test('scheduled rewards', async t => {
243243
])
244244
}
245245
})
246-
await t.test('validate signatures', async t => {
247-
await t.test('bad argument', async t => {
246+
suite('validate signatures', () => {
247+
test('bad argument', async t => {
248248
const digest = ethers.solidityPackedKeccak256(
249249
['address[]', 'uint256[]'],
250250
[['0x000000000000000000000000000000000000dEa2'], ['2']]
@@ -261,7 +261,7 @@ test('scheduled rewards', async t => {
261261
})
262262
assert.strictEqual(res.status, 403)
263263
})
264-
await t.test('bad signer', async t => {
264+
test('bad signer', async t => {
265265
const participants = ['0x000000000000000000000000000000000000dEa2']
266266
const scores = ['2']
267267
const digest = ethers.solidityPackedKeccak256(
@@ -281,7 +281,7 @@ test('scheduled rewards', async t => {
281281
assert.strictEqual(res.status, 403)
282282
})
283283
})
284-
await t.test('single scheduled rewards', async t => {
284+
test('single scheduled rewards', async t => {
285285
{
286286
const res = await fetch(
287287
`${api}/scheduled-rewards/0x000000000000000000000000000000000000dEa2`

0 commit comments

Comments
 (0)