Import verified AzerothAI snapshot from GitHub
Core tests / core (push) Successful in 9m57s
Full verification / application (push) Failing after 5m16s
Full verification / local-brain (push) Failing after 6m15s
Realm simulation / simulated-live-world (push) Failing after 5m32s
WoW integration lab / real-worldserver (push) Canceled after 17m23s
Core tests / core (push) Successful in 9m57s
Full verification / application (push) Failing after 5m16s
Full verification / local-brain (push) Failing after 6m15s
Realm simulation / simulated-live-world (push) Failing after 5m32s
WoW integration lab / real-worldserver (push) Canceled after 17m23s
Source branch: feature/ai-brain-router Source commit: c2a09e0460465201a58aaab56c71424e9a96405e
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
const {test}=require('node:test');
|
||||
const assert=require('node:assert/strict');
|
||||
const {compileAleOperatorRequest,wrapAleCommand,ALE_SURFACE}=require('../.test-build/ale.js');
|
||||
|
||||
test('ALE command lane compiles server commands without raw execution',()=>{
|
||||
const source=compileAleOperatorRequest({kind:'command',command:'server info'},false);
|
||||
assert.match(source,/RunCommand/);
|
||||
assert.match(source,/server info/);
|
||||
});
|
||||
|
||||
test('ALE typed calls compile global player and playerbot AI methods',()=>{
|
||||
assert.match(compileAleOperatorRequest({kind:'global',method:'SendWorldMessage',args:['Hello']},false),/SendWorldMessage/);
|
||||
assert.match(compileAleOperatorRequest({kind:'player',player:'Zaku',method:'GetHealth'},false),/GetPlayerByName/);
|
||||
assert.match(compileAleOperatorRequest({kind:'playerbotAI',player:'Zaku',method:'DoSpecificAction',args:['follow']},false),/GetBotAI/);
|
||||
});
|
||||
|
||||
test('ALE method names are identifier-only',()=>{
|
||||
assert.throws(()=>compileAleOperatorRequest({kind:'global',method:'RunCommand); os.execute("x") --'},false),/Invalid ALE method name/);
|
||||
});
|
||||
|
||||
test('raw ALE execution is disabled unless explicitly enabled',()=>{
|
||||
assert.throws(()=>compileAleOperatorRequest({kind:'raw',source:'return GetPlayerCount()'},false),/disabled/);
|
||||
assert.equal(compileAleOperatorRequest({kind:'raw',source:'return GetPlayerCount()'},true),'return GetPlayerCount()');
|
||||
});
|
||||
|
||||
test('wrapped ALE command reports completion through the bridge callback',()=>{
|
||||
const source=wrapAleCommand('11111111-1111-4111-8111-111111111111','return 7');
|
||||
assert.match(source,/AzerothAIComplete/);
|
||||
assert.match(source,/return 7/);
|
||||
});
|
||||
|
||||
test('surface inventory includes every documented ALE class family',()=>{
|
||||
assert.equal(ALE_SURFACE.gameClasses.length,30);
|
||||
assert.equal(ALE_SURFACE.playerbotClasses.length,7);
|
||||
assert.equal(ALE_SURFACE.modelAccess,'none');
|
||||
});
|
||||
Reference in New Issue
Block a user