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 8b79df5 commit efd4e25
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"devDependencies": {
"@antora/cli": "^3.1.10",
"@antora/site-generator": "^3.1.10",
"@asciidoctor/core": "~2.2",
"@jest/globals": "^29.7.0",
"cross-env": "^7.0.3",
"eslint": "~7.32",
Expand Down
12 changes: 10 additions & 2 deletions tests/asciidoctor/extension.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ const { describe, it, expect } = require('@jest/globals')
const matchers = require('jest-extended')
expect.extend(matchers)

const Asciidoctor = require('@asciidoctor/core')
const asciidoctor = Asciidoctor()
const asciidoctorModule = require('@asciidoctor/core')
const asciidoctor = (() => {
try {
// Try Asciidoctor 3.0 initialization
return asciidoctorModule.default()
} catch (e) {
// Fallback to Asciidoctor 2.x initialization
return asciidoctorModule()
}
})()
const asciidoctorTreeView = require('../../lib/index.js')

const example3Result = 'README.adoc'
Expand Down
12 changes: 10 additions & 2 deletions tests/asciidoctor/full.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ const matchers = require('jest-extended')
expect.extend(matchers)
const path = require('path')

const Asciidoctor = require('@asciidoctor/core')
const asciidoctor = Asciidoctor()
const asciidoctorModule = require('@asciidoctor/core')
const asciidoctor = (() => {
try {
// Try Asciidoctor 3.0 initialization
return asciidoctorModule.default()
} catch (e) {
// Fallback to Asciidoctor 2.x initialization
return asciidoctorModule()
}
})()
const asciidoctorTreeView = require('../../lib/index.js')

describe('Full Test', () => {
Expand Down

0 comments on commit efd4e25

Please sign in to comment.