Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lask79 committed Feb 19, 2025
1 parent 5992cda commit 25d2982
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-asciidoctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
node-version: [18.x, 20.x, 22.x]
asciidoctor-version: ['~2.2', '~3.0']

steps:
Expand Down
21 changes: 17 additions & 4 deletions tests/antora/antora-build.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ describe('Antora Extension', () => {
`Found fatal errors in build output:\n${JSON.stringify(fatalLines, null, 2)}`
);

// Debug log output
console.log('Raw output:', output);
console.log('Parsed log lines:', JSON.stringify(logLines, null, 2));

// Verify expected info messages
const expectedMessages = [
'Registering asciidoctor-treeview with config',
Expand All @@ -96,11 +100,20 @@ describe('Antora Extension', () => {
'Copying css/treeview.css to _/css'
];

// First check if we have any info messages at all
const infoMessages = logLines.filter(line => line.level === 'info').map(line => line.msg);
console.log('Info messages found:', infoMessages);

// More flexible message checking
expectedMessages.forEach(msg => {
const found = logLines.some(line =>
line.level === 'info' && line.msg.includes(msg)
);
expect(found).toBe(true, `Expected to find info message: ${msg}`);
const found = logLines.some(line => {
if (line.level !== 'info') return false;
const lineMsg = line.msg || '';
return lineMsg.toLowerCase().includes(msg.toLowerCase());
});
expect(found).toBe(true,
`Expected to find info message: ${msg}\n` +
`Available info messages: ${JSON.stringify(infoMessages, null, 2)}`);
});
});

Expand Down

0 comments on commit 25d2982

Please sign in to comment.