test(codex): normalize node tests on windows
This commit is contained in:
@@ -60,12 +60,13 @@ async function readComponentHookManifests() {
|
||||
|
||||
function collectCommandHooks(hooks, source, version) {
|
||||
const commandHooks = [];
|
||||
const normalizedSource = source.replaceAll("\\", "/");
|
||||
for (const [eventName, groups] of Object.entries(hooks.hooks)) {
|
||||
groups.forEach((group, groupIndex) => {
|
||||
group.hooks.forEach((handler, handlerIndex) => {
|
||||
if (handler.type !== "command") return;
|
||||
commandHooks.push({
|
||||
id: `${source}:${eventName}:${groupIndex}:${handlerIndex}`,
|
||||
id: `${normalizedSource}:${eventName}:${groupIndex}:${handlerIndex}`,
|
||||
version,
|
||||
statusMessage: handler.statusMessage,
|
||||
});
|
||||
|
||||
@@ -60,7 +60,7 @@ test("#given synced aggregate Codex skills #when inspected #then component and s
|
||||
assert.deepEqual(skillNames, expectedSkills);
|
||||
for (const skillName of expectedSkills) {
|
||||
const content = await readFile(join(skillsRoot, skillName, "SKILL.md"), "utf8");
|
||||
assert.match(content, /^---\n/);
|
||||
assert.match(content, /^---\r?\n/);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -132,7 +132,7 @@ test("#given synced ulw-loop skill #when Codex hint metadata is inspected #then
|
||||
const interfaceMetadata = await readFile(join(skillRoot, "agents", "openai.yaml"), "utf8");
|
||||
|
||||
// then
|
||||
assert.match(skill, /^---\nname: ulw-loop\n/m);
|
||||
assert.match(skill, /^---\r?\nname: ulw-loop\r?\n/m);
|
||||
assert.match(skill, /Goal-like loop that uses ultrawork mode to decompose work into systematic, evidence-bound steps\./);
|
||||
assert.match(interfaceMetadata, /display_name: "ulw-loop \(omo\)"/);
|
||||
assert.doesNotMatch(interfaceMetadata, /ulw-loop \/ ulw-loop/);
|
||||
|
||||
Reference in New Issue
Block a user