mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-11 01:36:16 +00:00
feature: Update the version to 2.60.0 and improve the handling of human gestures, etc.
This commit is contained in:
@@ -14,12 +14,12 @@ test('MobileFlow module exports correctly', async () => {
|
||||
|
||||
test('MobileFlow has run method', async () => {
|
||||
const { MobileFlow } = await import('../../src/flows/MobileFlow')
|
||||
|
||||
|
||||
// Mock bot instance
|
||||
const mockBot = {
|
||||
log: () => {},
|
||||
log: () => { },
|
||||
isMobile: true,
|
||||
config: {
|
||||
config: {
|
||||
workers: {},
|
||||
runOnZeroPoints: false,
|
||||
searchSettings: { retryMobileSearchAmount: 0 }
|
||||
@@ -29,7 +29,7 @@ test('MobileFlow has run method', async () => {
|
||||
activities: {},
|
||||
compromisedModeActive: false
|
||||
}
|
||||
|
||||
|
||||
const flow = new MobileFlow(mockBot as never)
|
||||
assert.ok(flow, 'MobileFlow instance should be created')
|
||||
assert.equal(typeof flow.run, 'function', 'MobileFlow should have run() method')
|
||||
@@ -37,27 +37,27 @@ test('MobileFlow has run method', async () => {
|
||||
|
||||
test('MobileFlowResult interface has correct structure', async () => {
|
||||
const { MobileFlow } = await import('../../src/flows/MobileFlow')
|
||||
|
||||
|
||||
// Validate that MobileFlowResult type exports (compile-time check)
|
||||
type MobileFlowResult = Awaited<ReturnType<InstanceType<typeof MobileFlow>['run']>>
|
||||
|
||||
|
||||
const mockResult: MobileFlowResult = {
|
||||
initialPoints: 1000,
|
||||
collectedPoints: 30
|
||||
}
|
||||
|
||||
|
||||
assert.equal(typeof mockResult.initialPoints, 'number', 'initialPoints should be a number')
|
||||
assert.equal(typeof mockResult.collectedPoints, 'number', 'collectedPoints should be a number')
|
||||
})
|
||||
|
||||
test('MobileFlow accepts retry tracker', async () => {
|
||||
const { MobileFlow } = await import('../../src/flows/MobileFlow')
|
||||
const { MobileRetryTracker } = await import('../../src/util/MobileRetryTracker')
|
||||
|
||||
const { MobileRetryTracker } = await import('../../src/util/state/MobileRetryTracker')
|
||||
|
||||
const mockBot = {
|
||||
log: () => {},
|
||||
log: () => { },
|
||||
isMobile: true,
|
||||
config: {
|
||||
config: {
|
||||
workers: {},
|
||||
runOnZeroPoints: false,
|
||||
searchSettings: { retryMobileSearchAmount: 3 }
|
||||
@@ -67,10 +67,10 @@ test('MobileFlow accepts retry tracker', async () => {
|
||||
activities: {},
|
||||
compromisedModeActive: false
|
||||
}
|
||||
|
||||
|
||||
const flow = new MobileFlow(mockBot as never)
|
||||
const tracker = new MobileRetryTracker(3)
|
||||
|
||||
|
||||
assert.ok(flow, 'MobileFlow should accept retry tracker')
|
||||
assert.equal(typeof tracker.registerFailure, 'function', 'MobileRetryTracker should have registerFailure method')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user