-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { EItem, EMonster } from 'oldschooljs'; | ||
import { describe, expect, it } from 'vitest'; | ||
|
||
import { clueCommand } from '../../src/mahoji/commands/clue'; | ||
import { createTestUser } from './util'; | ||
|
||
describe('Clue Juggling', async () => { | ||
it('general test', async () => { | ||
const user = await createTestUser(); | ||
await user.equip('melee', [ | ||
EItem.PRIMORDIAL_BOOTS, | ||
EItem.INFERNAL_MAX_CAPE, | ||
EItem.FEROCIOUS_GLOVES, | ||
EItem.AMULET_OF_TORTURE, | ||
EItem.INQUISITORS_MACE, | ||
EItem.INQUISITORS_HAUBERK, | ||
EItem.INQUISITORS_PLATESKIRT | ||
]); | ||
expect(user.bank.amount(EItem.CLUE_SCROLL_BEGINNER)).toBe(0); | ||
expect(user.bank.amount(EItem.CLUE_SCROLL_EASY)).toBe(0); | ||
await user.kill(EMonster.MAN); | ||
|
||
expect(user.bank.amount(EItem.CLUE_SCROLL_BEGINNER)).toEqual(0); | ||
expect(user.bank.amount(EItem.CLUE_SCROLL_EASY)).toEqual(0); | ||
|
||
const droppedClues = await prisma.droppedClueScroll.findMany({ | ||
where: { | ||
user_id: user.id | ||
} | ||
}); | ||
expect(droppedClues.length).toBeGreaterThan(0); | ||
const cmdResult = await user.runCommand(clueCommand, { | ||
tier: 'beginner' | ||
}); | ||
expect(cmdResult).toContain('is now completing '); | ||
expect(cmdResult).not.toContain('is now completing 1x'); | ||
expect(user.bank.amount(EItem.CLUE_SCROLL_BEGINNER)).toEqual(0); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters