Support local served entry #1065
test.yml
on: push
build-and-push-image
4m 9s
Matrix: build-and-test
Annotations
90 errors and 4 warnings
tests/builder.test.ts > generate workspace directory:
tests/builder.test.ts#L45
AssertionError: expected Set{ 'cover.html', 'index.html', …(10) } to deeply equal Set{ 'index.html', 'cover.html', …(10) }
- Expected
+ Received
Set {
"cover.html",
"index.html",
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-theme.css",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:45:29
|
tests/builder.test.ts > generate from various manuscript formats:
tests/builder.test.ts#L227
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-html.html",
"manuscript/sample-xhtml.xhtml",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:227:29
|
tests/builder.test.ts > install local themes:
tests/builder.test.ts#L561
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/soda.html",
"manuscript/theme-reference.html",
"publication.json",
"sample-theme.css",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:561:29
|
tests/builder.test.ts > install remote themes:
tests/builder.test.ts#L631
AssertionError: expected [ 'publication.json', …(39) ] to include 'themes/packages/@vivliostyle/theme-ac…'
❯ tests/builder.test.ts:631:20
|
tests/builder.test.ts > use multiple themes:
tests/builder.test.ts#L678
AssertionError: expected [ …(3) ] to deeply equal [ …(3) ]
- Expected
+ Received
Array [
- "../themes/packages/debug-theme/theme.css",
- "../themes/packages/debug-theme/additional-theme.css",
+ "../themes/node_modules/debug-theme/theme.css",
+ "../themes/node_modules/debug-theme/additional-theme.css",
"sample-theme.css",
]
❯ tests/builder.test.ts:678:5
|
tests/config.test.ts > parse vivliostyle config:
tests/config.test.ts#L30
Error: Snapshot `parse vivliostyle config > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -126,25 +143,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+
|
tests/config.test.ts > override option by CLI command:
tests/config.test.ts#L87
Error: Snapshot `override option by CLI command > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,51 @@
Object {
"author": "myAuthor",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "author": "myAuthor",
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
+ "format": Array [
+ "webpub",
+ ],
+ "http": true,
+ "ignoreHttpsErrors": true,
+ "input": undefined,
+ "language": "myLanguage",
+ "logLevel": "info",
+ "output": Array [
+ "yuno.pdf",
+ "yuno",
+ ],
+ "proxyBypass": ".example.com",
+ "proxyPass": "proxy-auth-password",
+ "proxyServer": "http://localhost:3128",
+ "proxyUser": "proxy-auth-user",
+ "size": "JIS-B5",
+ "style": "https://vivlostyle.org",
+ "targets": Array [
+ Object {
+ "format": "pdf",
+ "path": "yuno.pdf",
+ },
+ Object {
+ "format": "webpub",
+ "path": "yuno",
+ },
+ ],
+ "theme": "https://myTheme.example.com",
+ "timeout": 42000,
+ "title": "myTitle",
+ "userStyle": "./user/style/dummy.css",
+ "viewer": "https://vivliostyle.org/viewer/",
+ "viewerParam": "allowScripts=false&pixelRatio=16",
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -59,35 +101,43 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "https://myTheme.example.com",
"name": "myTheme.example.com",
"type": "uri",
},
],
"title": "myTitle",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -129,10 +179,14 @@
"name": "myTheme.example.com",
"type": "uri",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "JIS-B5",
},
"themeIndexes": Set {
@@ -149,10 +203,11 @@
},
},
"themesDir": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes",
"timeout": 42000,
"title": "myTitle",
+ "tmpPrefix": ".vs-1734236258831.",
"vfmOptions": Object {
"disableFormatHtml": true,
"hardLineBreaks": true,
},
"viewer": "https://vivliostyle.org/viewer/",
❯ tests/config.test.ts:87:18
|
tests/config.test.ts > override option by environment variable:
tests/config.test.ts#L98
Error: Snapshot `override option by environment variable > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -131,25 +148,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/de
|
tests/config.test.ts > Loads same config file on each way:
tests/config.test.ts#L122
AssertionError: expected { …(44) } to deeply equal { …(44) }
- Expected
+ Received
Object {
"author": "author",
"base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
"cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"input": undefined,
"logLevel": "info",
"targets": Array [],
},
"context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
"jpeg",
"svg",
"gif",
"webp",
"apng",
"ttf",
"otf",
"woff",
"woff2",
"zip",
],
"includes": Array [
"xx/yy",
"**/zz",
],
},
"cover": Object {
"htmlPath": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"name": "Cover image alt",
"src": "__WORKSPACE__/tests/fixtures/config/cover.png",
},
"cropMarks": false,
"cropOffset": undefined,
"css": undefined,
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function VFM],
"entries": Array [
Object {
"coverImageAlt": "Cover image alt",
"coverImageSrc": "__WORKSPACE__/tests/fixtures/config/cover.png",
"rel": "cover",
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"themes": Array [],
"title": "title",
},
Object {
"rel": "contents",
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"tocTitle": "TOC",
"transform": Object {
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
"httpServer": false,
"ignoreHttpsErrors": false,
"image": "__IMAGE__",
"input": Object {
"entry": "__WORKSPACE__/tests/fixtures/config/workspaceDir/publication.json",
"format": "pub-manifest",
},
"language": "language",
"logLevel": "info",
"manifestPath"
|
tests/config.test.ts > yields a config with single markdown:
tests/config.test.ts#L150
Error: Snapshot `yields a config with single markdown 1` mismatched
- Expected
+ Received
@@ -1,9 +1,17 @@
Object {
"author": undefined,
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "chromium",
+ "cliFlags": Object {
+ "configPath": undefined,
+ "input": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests",
"copyAsset": Object {
"excludes": Array [],
"fileExtensions": Array [
"png",
"jpg",
@@ -26,15 +34,19 @@
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function],
"entries": Array [
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "type": "file",
+ },
"target": "__SNIP__",
"themes": Array [],
"title": "Yuno",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": "__SNIP__",
@@ -61,16 +73,21 @@
"proxy": undefined,
"quick": false,
"readingProgression": undefined,
"rootThemes": Array [],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": undefined,
"themeIndexes": Set {},
"themesDir": "__WORKSPACE__/tests/fixtures/config/themes",
"timeout": 120000,
"title": "Yuno",
+ "tmpPrefix": ".vs-1734236258941.",
"vfmOptions": Object {
"disableFormatHtml": false,
"hardLineBreaks": false,
},
"viewer": undefined,
❯ tests/config.test.ts:150:18
|
tests/builder.test.ts > generate workspace directory:
tests/builder.test.ts#L45
AssertionError: expected Set{ 'cover.html', 'index.html', …(10) } to deeply equal Set{ 'index.html', 'cover.html', …(10) }
- Expected
+ Received
Set {
"cover.html",
"index.html",
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-theme.css",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:45:29
|
tests/builder.test.ts > generate from various manuscript formats:
tests/builder.test.ts#L227
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-html.html",
"manuscript/sample-xhtml.xhtml",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:227:29
|
tests/builder.test.ts > install local themes:
tests/builder.test.ts#L561
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/soda.html",
"manuscript/theme-reference.html",
"publication.json",
"sample-theme.css",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:561:29
|
tests/builder.test.ts > install remote themes:
tests/builder.test.ts#L631
AssertionError: expected [ 'publication.json', …(39) ] to include 'themes/packages/@vivliostyle/theme-ac…'
❯ tests/builder.test.ts:631:20
|
tests/builder.test.ts > use multiple themes:
tests/builder.test.ts#L678
AssertionError: expected [ …(3) ] to deeply equal [ …(3) ]
- Expected
+ Received
Array [
- "../themes/packages/debug-theme/theme.css",
- "../themes/packages/debug-theme/additional-theme.css",
+ "../themes/node_modules/debug-theme/theme.css",
+ "../themes/node_modules/debug-theme/additional-theme.css",
"sample-theme.css",
]
❯ tests/builder.test.ts:678:5
|
tests/config.test.ts > parse vivliostyle config:
tests/config.test.ts#L30
Error: Snapshot `parse vivliostyle config > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -126,25 +143,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+
|
tests/config.test.ts > override option by CLI command:
tests/config.test.ts#L87
Error: Snapshot `override option by CLI command > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,51 @@
Object {
"author": "myAuthor",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "author": "myAuthor",
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
+ "format": Array [
+ "webpub",
+ ],
+ "http": true,
+ "ignoreHttpsErrors": true,
+ "input": undefined,
+ "language": "myLanguage",
+ "logLevel": "info",
+ "output": Array [
+ "yuno.pdf",
+ "yuno",
+ ],
+ "proxyBypass": ".example.com",
+ "proxyPass": "proxy-auth-password",
+ "proxyServer": "http://localhost:3128",
+ "proxyUser": "proxy-auth-user",
+ "size": "JIS-B5",
+ "style": "https://vivlostyle.org",
+ "targets": Array [
+ Object {
+ "format": "pdf",
+ "path": "yuno.pdf",
+ },
+ Object {
+ "format": "webpub",
+ "path": "yuno",
+ },
+ ],
+ "theme": "https://myTheme.example.com",
+ "timeout": 42000,
+ "title": "myTitle",
+ "userStyle": "./user/style/dummy.css",
+ "viewer": "https://vivliostyle.org/viewer/",
+ "viewerParam": "allowScripts=false&pixelRatio=16",
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -59,35 +101,43 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "https://myTheme.example.com",
"name": "myTheme.example.com",
"type": "uri",
},
],
"title": "myTitle",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -129,10 +179,14 @@
"name": "myTheme.example.com",
"type": "uri",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "JIS-B5",
},
"themeIndexes": Set {
@@ -149,10 +203,11 @@
},
},
"themesDir": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes",
"timeout": 42000,
"title": "myTitle",
+ "tmpPrefix": ".vs-1734236259586.",
"vfmOptions": Object {
"disableFormatHtml": true,
"hardLineBreaks": true,
},
"viewer": "https://vivliostyle.org/viewer/",
❯ tests/config.test.ts:87:18
|
tests/config.test.ts > override option by environment variable:
tests/config.test.ts#L98
Error: Snapshot `override option by environment variable > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -131,25 +148,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/de
|
tests/config.test.ts > Loads same config file on each way:
tests/config.test.ts#L122
AssertionError: expected { …(44) } to deeply equal { …(44) }
- Expected
+ Received
Object {
"author": "author",
"base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
"cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"input": undefined,
"logLevel": "info",
"targets": Array [],
},
"context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
"jpeg",
"svg",
"gif",
"webp",
"apng",
"ttf",
"otf",
"woff",
"woff2",
"zip",
],
"includes": Array [
"xx/yy",
"**/zz",
],
},
"cover": Object {
"htmlPath": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"name": "Cover image alt",
"src": "__WORKSPACE__/tests/fixtures/config/cover.png",
},
"cropMarks": false,
"cropOffset": undefined,
"css": undefined,
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function VFM],
"entries": Array [
Object {
"coverImageAlt": "Cover image alt",
"coverImageSrc": "__WORKSPACE__/tests/fixtures/config/cover.png",
"rel": "cover",
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"themes": Array [],
"title": "title",
},
Object {
"rel": "contents",
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"tocTitle": "TOC",
"transform": Object {
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
"httpServer": false,
"ignoreHttpsErrors": false,
"image": "__IMAGE__",
"input": Object {
"entry": "__WORKSPACE__/tests/fixtures/config/workspaceDir/publication.json",
"format": "pub-manifest",
},
"language": "language",
"logLevel": "info",
"manifestPath"
|
tests/config.test.ts > yields a config with single markdown:
tests/config.test.ts#L150
Error: Snapshot `yields a config with single markdown 1` mismatched
- Expected
+ Received
@@ -1,9 +1,17 @@
Object {
"author": undefined,
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "chromium",
+ "cliFlags": Object {
+ "configPath": undefined,
+ "input": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests",
"copyAsset": Object {
"excludes": Array [],
"fileExtensions": Array [
"png",
"jpg",
@@ -26,15 +34,19 @@
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function],
"entries": Array [
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "type": "file",
+ },
"target": "__SNIP__",
"themes": Array [],
"title": "Yuno",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": "__SNIP__",
@@ -61,16 +73,21 @@
"proxy": undefined,
"quick": false,
"readingProgression": undefined,
"rootThemes": Array [],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": undefined,
"themeIndexes": Set {},
"themesDir": "__WORKSPACE__/tests/fixtures/config/themes",
"timeout": 120000,
"title": "Yuno",
+ "tmpPrefix": ".vs-1734236259657.",
"vfmOptions": Object {
"disableFormatHtml": false,
"hardLineBreaks": false,
},
"viewer": undefined,
❯ tests/config.test.ts:150:18
|
tests/builder.test.ts > generate workspace directory:
tests/builder.test.ts#L45
AssertionError: expected Set{ 'cover.html', 'index.html', …(10) } to deeply equal Set{ 'index.html', 'cover.html', …(10) }
- Expected
+ Received
Set {
"cover.html",
"index.html",
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-theme.css",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:45:29
|
tests/builder.test.ts > generate from various manuscript formats:
tests/builder.test.ts#L227
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-html.html",
"manuscript/sample-xhtml.xhtml",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:227:29
|
tests/builder.test.ts > install local themes:
tests/builder.test.ts#L561
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/soda.html",
"manuscript/theme-reference.html",
"publication.json",
"sample-theme.css",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:561:29
|
tests/builder.test.ts > install remote themes:
tests/builder.test.ts#L631
AssertionError: expected [ 'publication.json', …(39) ] to include 'themes/packages/@vivliostyle/theme-ac…'
❯ tests/builder.test.ts:631:20
|
tests/builder.test.ts > use multiple themes:
tests/builder.test.ts#L678
AssertionError: expected [ …(3) ] to deeply equal [ …(3) ]
- Expected
+ Received
Array [
- "../themes/packages/debug-theme/theme.css",
- "../themes/packages/debug-theme/additional-theme.css",
+ "../themes/node_modules/debug-theme/theme.css",
+ "../themes/node_modules/debug-theme/additional-theme.css",
"sample-theme.css",
]
❯ tests/builder.test.ts:678:5
|
tests/config.test.ts > parse vivliostyle config:
tests/config.test.ts#L30
Error: Snapshot `parse vivliostyle config > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -126,25 +143,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+
|
tests/config.test.ts > override option by CLI command:
tests/config.test.ts#L87
Error: Snapshot `override option by CLI command > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,51 @@
Object {
"author": "myAuthor",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "author": "myAuthor",
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
+ "format": Array [
+ "webpub",
+ ],
+ "http": true,
+ "ignoreHttpsErrors": true,
+ "input": undefined,
+ "language": "myLanguage",
+ "logLevel": "info",
+ "output": Array [
+ "yuno.pdf",
+ "yuno",
+ ],
+ "proxyBypass": ".example.com",
+ "proxyPass": "proxy-auth-password",
+ "proxyServer": "http://localhost:3128",
+ "proxyUser": "proxy-auth-user",
+ "size": "JIS-B5",
+ "style": "https://vivlostyle.org",
+ "targets": Array [
+ Object {
+ "format": "pdf",
+ "path": "yuno.pdf",
+ },
+ Object {
+ "format": "webpub",
+ "path": "yuno",
+ },
+ ],
+ "theme": "https://myTheme.example.com",
+ "timeout": 42000,
+ "title": "myTitle",
+ "userStyle": "./user/style/dummy.css",
+ "viewer": "https://vivliostyle.org/viewer/",
+ "viewerParam": "allowScripts=false&pixelRatio=16",
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -59,35 +101,43 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "https://myTheme.example.com",
"name": "myTheme.example.com",
"type": "uri",
},
],
"title": "myTitle",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -129,10 +179,14 @@
"name": "myTheme.example.com",
"type": "uri",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "JIS-B5",
},
"themeIndexes": Set {
@@ -149,10 +203,11 @@
},
},
"themesDir": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes",
"timeout": 42000,
"title": "myTitle",
+ "tmpPrefix": ".vs-1734236260875.",
"vfmOptions": Object {
"disableFormatHtml": true,
"hardLineBreaks": true,
},
"viewer": "https://vivliostyle.org/viewer/",
❯ tests/config.test.ts:87:18
|
tests/config.test.ts > override option by environment variable:
tests/config.test.ts#L98
Error: Snapshot `override option by environment variable > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -131,25 +148,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/de
|
tests/config.test.ts > Loads same config file on each way:
tests/config.test.ts#L122
AssertionError: expected { …(44) } to deeply equal { …(44) }
- Expected
+ Received
Object {
"author": "author",
"base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
"cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"input": undefined,
"logLevel": "info",
"targets": Array [],
},
"context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
"jpeg",
"svg",
"gif",
"webp",
"apng",
"ttf",
"otf",
"woff",
"woff2",
"zip",
],
"includes": Array [
"xx/yy",
"**/zz",
],
},
"cover": Object {
"htmlPath": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"name": "Cover image alt",
"src": "__WORKSPACE__/tests/fixtures/config/cover.png",
},
"cropMarks": false,
"cropOffset": undefined,
"css": undefined,
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function VFM],
"entries": Array [
Object {
"coverImageAlt": "Cover image alt",
"coverImageSrc": "__WORKSPACE__/tests/fixtures/config/cover.png",
"rel": "cover",
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"themes": Array [],
"title": "title",
},
Object {
"rel": "contents",
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"tocTitle": "TOC",
"transform": Object {
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
"httpServer": false,
"ignoreHttpsErrors": false,
"image": "__IMAGE__",
"input": Object {
"entry": "__WORKSPACE__/tests/fixtures/config/workspaceDir/publication.json",
"format": "pub-manifest",
},
"language": "language",
"logLevel": "info",
"manifestPath"
|
tests/config.test.ts > yields a config with single markdown:
tests/config.test.ts#L150
Error: Snapshot `yields a config with single markdown 1` mismatched
- Expected
+ Received
@@ -1,9 +1,17 @@
Object {
"author": undefined,
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "chromium",
+ "cliFlags": Object {
+ "configPath": undefined,
+ "input": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests",
"copyAsset": Object {
"excludes": Array [],
"fileExtensions": Array [
"png",
"jpg",
@@ -26,15 +34,19 @@
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function],
"entries": Array [
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "type": "file",
+ },
"target": "__SNIP__",
"themes": Array [],
"title": "Yuno",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": "__SNIP__",
@@ -61,16 +73,21 @@
"proxy": undefined,
"quick": false,
"readingProgression": undefined,
"rootThemes": Array [],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": undefined,
"themeIndexes": Set {},
"themesDir": "__WORKSPACE__/tests/fixtures/config/themes",
"timeout": 120000,
"title": "Yuno",
+ "tmpPrefix": ".vs-1734236261083.",
"vfmOptions": Object {
"disableFormatHtml": false,
"hardLineBreaks": false,
},
"viewer": undefined,
❯ tests/config.test.ts:150:18
|
tests/builder.test.ts > generate workspace directory:
tests/builder.test.ts#L45
AssertionError: expected Set{ 'cover.html', 'index.html', …(10) } to deeply equal Set{ 'index.html', 'cover.html', …(10) }
- Expected
+ Received
Set {
"cover.html",
"index.html",
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-theme.css",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:45:29
|
tests/builder.test.ts > generate from various manuscript formats:
tests/builder.test.ts#L227
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-html.html",
"manuscript/sample-xhtml.xhtml",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:227:29
|
tests/builder.test.ts > install local themes:
tests/builder.test.ts#L561
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/soda.html",
"manuscript/theme-reference.html",
"publication.json",
"sample-theme.css",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:561:29
|
tests/builder.test.ts > install remote themes:
tests/builder.test.ts#L631
AssertionError: expected [ 'publication.json', …(39) ] to include 'themes/packages/@vivliostyle/theme-ac…'
❯ tests/builder.test.ts:631:20
|
tests/builder.test.ts > use multiple themes:
tests/builder.test.ts#L678
AssertionError: expected [ …(3) ] to deeply equal [ …(3) ]
- Expected
+ Received
Array [
- "../themes/packages/debug-theme/theme.css",
- "../themes/packages/debug-theme/additional-theme.css",
+ "../themes/node_modules/debug-theme/theme.css",
+ "../themes/node_modules/debug-theme/additional-theme.css",
"sample-theme.css",
]
❯ tests/builder.test.ts:678:5
|
tests/config.test.ts > parse vivliostyle config:
tests/config.test.ts#L30
Error: Snapshot `parse vivliostyle config > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -126,25 +143,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+
|
tests/config.test.ts > override option by CLI command:
tests/config.test.ts#L87
Error: Snapshot `override option by CLI command > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,51 @@
Object {
"author": "myAuthor",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "author": "myAuthor",
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
+ "format": Array [
+ "webpub",
+ ],
+ "http": true,
+ "ignoreHttpsErrors": true,
+ "input": undefined,
+ "language": "myLanguage",
+ "logLevel": "info",
+ "output": Array [
+ "yuno.pdf",
+ "yuno",
+ ],
+ "proxyBypass": ".example.com",
+ "proxyPass": "proxy-auth-password",
+ "proxyServer": "http://localhost:3128",
+ "proxyUser": "proxy-auth-user",
+ "size": "JIS-B5",
+ "style": "https://vivlostyle.org",
+ "targets": Array [
+ Object {
+ "format": "pdf",
+ "path": "yuno.pdf",
+ },
+ Object {
+ "format": "webpub",
+ "path": "yuno",
+ },
+ ],
+ "theme": "https://myTheme.example.com",
+ "timeout": 42000,
+ "title": "myTitle",
+ "userStyle": "./user/style/dummy.css",
+ "viewer": "https://vivliostyle.org/viewer/",
+ "viewerParam": "allowScripts=false&pixelRatio=16",
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -59,35 +101,43 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "https://myTheme.example.com",
"name": "myTheme.example.com",
"type": "uri",
},
],
"title": "myTitle",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -129,10 +179,14 @@
"name": "myTheme.example.com",
"type": "uri",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "JIS-B5",
},
"themeIndexes": Set {
@@ -149,10 +203,11 @@
},
},
"themesDir": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes",
"timeout": 42000,
"title": "myTitle",
+ "tmpPrefix": ".vs-1734236266499.",
"vfmOptions": Object {
"disableFormatHtml": true,
"hardLineBreaks": true,
},
"viewer": "https://vivliostyle.org/viewer/",
❯ tests/config.test.ts:87:18
|
tests/config.test.ts > override option by environment variable:
tests/config.test.ts#L98
Error: Snapshot `override option by environment variable > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -131,25 +148,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/de
|
tests/config.test.ts > Loads same config file on each way:
tests/config.test.ts#L122
AssertionError: expected { …(44) } to deeply equal { …(44) }
- Expected
+ Received
Object {
"author": "author",
"base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
"cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"input": undefined,
"logLevel": "info",
"targets": Array [],
},
"context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
"jpeg",
"svg",
"gif",
"webp",
"apng",
"ttf",
"otf",
"woff",
"woff2",
"zip",
],
"includes": Array [
"xx/yy",
"**/zz",
],
},
"cover": Object {
"htmlPath": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"name": "Cover image alt",
"src": "__WORKSPACE__/tests/fixtures/config/cover.png",
},
"cropMarks": false,
"cropOffset": undefined,
"css": undefined,
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function VFM],
"entries": Array [
Object {
"coverImageAlt": "Cover image alt",
"coverImageSrc": "__WORKSPACE__/tests/fixtures/config/cover.png",
"rel": "cover",
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"themes": Array [],
"title": "title",
},
Object {
"rel": "contents",
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"tocTitle": "TOC",
"transform": Object {
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
"httpServer": false,
"ignoreHttpsErrors": false,
"image": "__IMAGE__",
"input": Object {
"entry": "__WORKSPACE__/tests/fixtures/config/workspaceDir/publication.json",
"format": "pub-manifest",
},
"language": "language",
"logLevel": "info",
"manifestPath"
|
tests/config.test.ts > yields a config with single markdown:
tests/config.test.ts#L150
Error: Snapshot `yields a config with single markdown 1` mismatched
- Expected
+ Received
@@ -1,9 +1,17 @@
Object {
"author": undefined,
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "chromium",
+ "cliFlags": Object {
+ "configPath": undefined,
+ "input": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests",
"copyAsset": Object {
"excludes": Array [],
"fileExtensions": Array [
"png",
"jpg",
@@ -26,15 +34,19 @@
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function],
"entries": Array [
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "type": "file",
+ },
"target": "__SNIP__",
"themes": Array [],
"title": "Yuno",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": "__SNIP__",
@@ -61,16 +73,21 @@
"proxy": undefined,
"quick": false,
"readingProgression": undefined,
"rootThemes": Array [],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": undefined,
"themeIndexes": Set {},
"themesDir": "__WORKSPACE__/tests/fixtures/config/themes",
"timeout": 120000,
"title": "Yuno",
+ "tmpPrefix": ".vs-1734236266665.",
"vfmOptions": Object {
"disableFormatHtml": false,
"hardLineBreaks": false,
},
"viewer": undefined,
❯ tests/config.test.ts:150:18
|
tests/builder.test.ts > generate workspace directory:
tests/builder.test.ts#L45
AssertionError: expected Set{ 'cover.html', 'index.html', …(10) } to deeply equal Set{ 'index.html', 'cover.html', …(10) }
- Expected
+ Received
Set {
"cover.html",
"index.html",
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-theme.css",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:45:29
|
tests/builder.test.ts > generate from various manuscript formats:
tests/builder.test.ts#L227
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-html.html",
"manuscript/sample-xhtml.xhtml",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:227:29
|
tests/builder.test.ts > install local themes:
tests/builder.test.ts#L561
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/soda.html",
"manuscript/theme-reference.html",
"publication.json",
"sample-theme.css",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:561:29
|
tests/builder.test.ts > install remote themes:
tests/builder.test.ts#L631
AssertionError: expected [ 'publication.json', …(39) ] to include 'themes/packages/@vivliostyle/theme-ac…'
❯ tests/builder.test.ts:631:20
|
tests/builder.test.ts > use multiple themes:
tests/builder.test.ts#L678
AssertionError: expected [ …(3) ] to deeply equal [ …(3) ]
- Expected
+ Received
Array [
- "../themes/packages/debug-theme/theme.css",
- "../themes/packages/debug-theme/additional-theme.css",
+ "../themes/node_modules/debug-theme/theme.css",
+ "../themes/node_modules/debug-theme/additional-theme.css",
"sample-theme.css",
]
❯ tests/builder.test.ts:678:5
|
tests/config.test.ts > parse vivliostyle config:
tests/config.test.ts#L30
Error: Snapshot `parse vivliostyle config > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -126,25 +143,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+
|
tests/config.test.ts > override option by CLI command:
tests/config.test.ts#L87
Error: Snapshot `override option by CLI command > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,51 @@
Object {
"author": "myAuthor",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "author": "myAuthor",
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
+ "format": Array [
+ "webpub",
+ ],
+ "http": true,
+ "ignoreHttpsErrors": true,
+ "input": undefined,
+ "language": "myLanguage",
+ "logLevel": "info",
+ "output": Array [
+ "yuno.pdf",
+ "yuno",
+ ],
+ "proxyBypass": ".example.com",
+ "proxyPass": "proxy-auth-password",
+ "proxyServer": "http://localhost:3128",
+ "proxyUser": "proxy-auth-user",
+ "size": "JIS-B5",
+ "style": "https://vivlostyle.org",
+ "targets": Array [
+ Object {
+ "format": "pdf",
+ "path": "yuno.pdf",
+ },
+ Object {
+ "format": "webpub",
+ "path": "yuno",
+ },
+ ],
+ "theme": "https://myTheme.example.com",
+ "timeout": 42000,
+ "title": "myTitle",
+ "userStyle": "./user/style/dummy.css",
+ "viewer": "https://vivliostyle.org/viewer/",
+ "viewerParam": "allowScripts=false&pixelRatio=16",
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -59,35 +101,43 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "https://myTheme.example.com",
"name": "myTheme.example.com",
"type": "uri",
},
],
"title": "myTitle",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -129,10 +179,14 @@
"name": "myTheme.example.com",
"type": "uri",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "JIS-B5",
},
"themeIndexes": Set {
@@ -149,10 +203,11 @@
},
},
"themesDir": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes",
"timeout": 42000,
"title": "myTitle",
+ "tmpPrefix": ".vs-1734236267103.",
"vfmOptions": Object {
"disableFormatHtml": true,
"hardLineBreaks": true,
},
"viewer": "https://vivliostyle.org/viewer/",
❯ tests/config.test.ts:87:18
|
tests/config.test.ts > override option by environment variable:
tests/config.test.ts#L98
Error: Snapshot `override option by environment variable > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -131,25 +148,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/de
|
tests/config.test.ts > Loads same config file on each way:
tests/config.test.ts#L122
AssertionError: expected { …(44) } to deeply equal { …(44) }
- Expected
+ Received
Object {
"author": "author",
"base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
"cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"input": undefined,
"logLevel": "info",
"targets": Array [],
},
"context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
"jpeg",
"svg",
"gif",
"webp",
"apng",
"ttf",
"otf",
"woff",
"woff2",
"zip",
],
"includes": Array [
"xx/yy",
"**/zz",
],
},
"cover": Object {
"htmlPath": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"name": "Cover image alt",
"src": "__WORKSPACE__/tests/fixtures/config/cover.png",
},
"cropMarks": false,
"cropOffset": undefined,
"css": undefined,
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function VFM],
"entries": Array [
Object {
"coverImageAlt": "Cover image alt",
"coverImageSrc": "__WORKSPACE__/tests/fixtures/config/cover.png",
"rel": "cover",
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"themes": Array [],
"title": "title",
},
Object {
"rel": "contents",
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"tocTitle": "TOC",
"transform": Object {
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
"httpServer": false,
"ignoreHttpsErrors": false,
"image": "__IMAGE__",
"input": Object {
"entry": "__WORKSPACE__/tests/fixtures/config/workspaceDir/publication.json",
"format": "pub-manifest",
},
"language": "language",
"logLevel": "info",
"manifestPath"
|
tests/config.test.ts > yields a config with single markdown:
tests/config.test.ts#L150
Error: Snapshot `yields a config with single markdown 1` mismatched
- Expected
+ Received
@@ -1,9 +1,17 @@
Object {
"author": undefined,
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "chromium",
+ "cliFlags": Object {
+ "configPath": undefined,
+ "input": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests",
"copyAsset": Object {
"excludes": Array [],
"fileExtensions": Array [
"png",
"jpg",
@@ -26,15 +34,19 @@
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function],
"entries": Array [
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "type": "file",
+ },
"target": "__SNIP__",
"themes": Array [],
"title": "Yuno",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": "__SNIP__",
@@ -61,16 +73,21 @@
"proxy": undefined,
"quick": false,
"readingProgression": undefined,
"rootThemes": Array [],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": undefined,
"themeIndexes": Set {},
"themesDir": "__WORKSPACE__/tests/fixtures/config/themes",
"timeout": 120000,
"title": "Yuno",
+ "tmpPrefix": ".vs-1734236267248.",
"vfmOptions": Object {
"disableFormatHtml": false,
"hardLineBreaks": false,
},
"viewer": undefined,
❯ tests/config.test.ts:150:18
|
tests/builder.test.ts > generate workspace directory:
tests/builder.test.ts#L45
AssertionError: expected Set{ 'cover.html', 'index.html', …(10) } to deeply equal Set{ 'index.html', 'cover.html', …(10) }
- Expected
+ Received
Set {
"cover.html",
"index.html",
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-theme.css",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:45:29
|
tests/builder.test.ts > generate from various manuscript formats:
tests/builder.test.ts#L227
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-html.html",
"manuscript/sample-xhtml.xhtml",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:227:29
|
tests/builder.test.ts > install local themes:
tests/builder.test.ts#L561
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/soda.html",
"manuscript/theme-reference.html",
"publication.json",
"sample-theme.css",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:561:29
|
tests/builder.test.ts > install remote themes:
tests/builder.test.ts#L631
AssertionError: expected [ 'publication.json', …(39) ] to include 'themes/packages/@vivliostyle/theme-ac…'
❯ tests/builder.test.ts:631:20
|
tests/builder.test.ts > use multiple themes:
tests/builder.test.ts#L678
AssertionError: expected [ …(3) ] to deeply equal [ …(3) ]
- Expected
+ Received
Array [
- "../themes/packages/debug-theme/theme.css",
- "../themes/packages/debug-theme/additional-theme.css",
+ "../themes/node_modules/debug-theme/theme.css",
+ "../themes/node_modules/debug-theme/additional-theme.css",
"sample-theme.css",
]
❯ tests/builder.test.ts:678:5
|
tests/config.test.ts > parse vivliostyle config:
tests/config.test.ts#L30
Error: Snapshot `parse vivliostyle config > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -126,25 +143,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+
|
tests/config.test.ts > override option by CLI command:
tests/config.test.ts#L87
Error: Snapshot `override option by CLI command > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,51 @@
Object {
"author": "myAuthor",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "author": "myAuthor",
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
+ "format": Array [
+ "webpub",
+ ],
+ "http": true,
+ "ignoreHttpsErrors": true,
+ "input": undefined,
+ "language": "myLanguage",
+ "logLevel": "info",
+ "output": Array [
+ "yuno.pdf",
+ "yuno",
+ ],
+ "proxyBypass": ".example.com",
+ "proxyPass": "proxy-auth-password",
+ "proxyServer": "http://localhost:3128",
+ "proxyUser": "proxy-auth-user",
+ "size": "JIS-B5",
+ "style": "https://vivlostyle.org",
+ "targets": Array [
+ Object {
+ "format": "pdf",
+ "path": "yuno.pdf",
+ },
+ Object {
+ "format": "webpub",
+ "path": "yuno",
+ },
+ ],
+ "theme": "https://myTheme.example.com",
+ "timeout": 42000,
+ "title": "myTitle",
+ "userStyle": "./user/style/dummy.css",
+ "viewer": "https://vivliostyle.org/viewer/",
+ "viewerParam": "allowScripts=false&pixelRatio=16",
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -59,35 +101,43 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "https://myTheme.example.com",
"name": "myTheme.example.com",
"type": "uri",
},
],
"title": "myTitle",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -129,10 +179,14 @@
"name": "myTheme.example.com",
"type": "uri",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "JIS-B5",
},
"themeIndexes": Set {
@@ -149,10 +203,11 @@
},
},
"themesDir": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes",
"timeout": 42000,
"title": "myTitle",
+ "tmpPrefix": ".vs-1734236269008.",
"vfmOptions": Object {
"disableFormatHtml": true,
"hardLineBreaks": true,
},
"viewer": "https://vivliostyle.org/viewer/",
❯ tests/config.test.ts:87:18
|
tests/config.test.ts > override option by environment variable:
tests/config.test.ts#L98
Error: Snapshot `override option by environment variable > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -131,25 +148,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/de
|
tests/config.test.ts > Loads same config file on each way:
tests/config.test.ts#L122
AssertionError: expected { …(44) } to deeply equal { …(44) }
- Expected
+ Received
Object {
"author": "author",
"base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
"cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"input": undefined,
"logLevel": "info",
"targets": Array [],
},
"context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
"jpeg",
"svg",
"gif",
"webp",
"apng",
"ttf",
"otf",
"woff",
"woff2",
"zip",
],
"includes": Array [
"xx/yy",
"**/zz",
],
},
"cover": Object {
"htmlPath": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"name": "Cover image alt",
"src": "__WORKSPACE__/tests/fixtures/config/cover.png",
},
"cropMarks": false,
"cropOffset": undefined,
"css": undefined,
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function VFM],
"entries": Array [
Object {
"coverImageAlt": "Cover image alt",
"coverImageSrc": "__WORKSPACE__/tests/fixtures/config/cover.png",
"rel": "cover",
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"themes": Array [],
"title": "title",
},
Object {
"rel": "contents",
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"tocTitle": "TOC",
"transform": Object {
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
"httpServer": false,
"ignoreHttpsErrors": false,
"image": "__IMAGE__",
"input": Object {
"entry": "__WORKSPACE__/tests/fixtures/config/workspaceDir/publication.json",
"format": "pub-manifest",
},
"language": "language",
"logLevel": "info",
"manifestPath"
|
tests/config.test.ts > yields a config with single markdown:
tests/config.test.ts#L150
Error: Snapshot `yields a config with single markdown 1` mismatched
- Expected
+ Received
@@ -1,9 +1,17 @@
Object {
"author": undefined,
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "chromium",
+ "cliFlags": Object {
+ "configPath": undefined,
+ "input": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests",
"copyAsset": Object {
"excludes": Array [],
"fileExtensions": Array [
"png",
"jpg",
@@ -26,15 +34,19 @@
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function],
"entries": Array [
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "type": "file",
+ },
"target": "__SNIP__",
"themes": Array [],
"title": "Yuno",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": "__SNIP__",
@@ -61,16 +73,21 @@
"proxy": undefined,
"quick": false,
"readingProgression": undefined,
"rootThemes": Array [],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": undefined,
"themeIndexes": Set {},
"themesDir": "__WORKSPACE__/tests/fixtures/config/themes",
"timeout": 120000,
"title": "Yuno",
+ "tmpPrefix": ".vs-1734236269113.",
"vfmOptions": Object {
"disableFormatHtml": false,
"hardLineBreaks": false,
},
"viewer": undefined,
❯ tests/config.test.ts:150:18
|
tests/builder.test.ts > generate workspace directory:
tests/builder.test.ts#L45
AssertionError: expected Set{ 'cover.html', 'index.html', …(10) } to deeply equal Set{ 'index.html', 'cover.html', …(10) }
- Expected
+ Received
Set {
"cover.html",
"index.html",
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-theme.css",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:45:29
|
tests/builder.test.ts > generate from various manuscript formats:
tests/builder.test.ts#L227
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-html.html",
"manuscript/sample-xhtml.xhtml",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:227:29
|
tests/builder.test.ts > install local themes:
tests/builder.test.ts#L561
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/soda.html",
"manuscript/theme-reference.html",
"publication.json",
"sample-theme.css",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:561:29
|
tests/builder.test.ts > install remote themes:
tests/builder.test.ts#L631
AssertionError: expected [ 'publication.json', …(39) ] to include 'themes/packages/@vivliostyle/theme-ac…'
❯ tests/builder.test.ts:631:20
|
tests/builder.test.ts > use multiple themes:
tests/builder.test.ts#L678
AssertionError: expected [ …(3) ] to deeply equal [ …(3) ]
- Expected
+ Received
Array [
- "../themes/packages/debug-theme/theme.css",
- "../themes/packages/debug-theme/additional-theme.css",
+ "../themes/node_modules/debug-theme/theme.css",
+ "../themes/node_modules/debug-theme/additional-theme.css",
"sample-theme.css",
]
❯ tests/builder.test.ts:678:5
|
tests/config.test.ts > parse vivliostyle config:
tests/config.test.ts#L30
Error: Snapshot `parse vivliostyle config > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -126,25 +143,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+
|
tests/config.test.ts > override option by CLI command:
tests/config.test.ts#L87
Error: Snapshot `override option by CLI command > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,51 @@
Object {
"author": "myAuthor",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "author": "myAuthor",
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
+ "format": Array [
+ "webpub",
+ ],
+ "http": true,
+ "ignoreHttpsErrors": true,
+ "input": undefined,
+ "language": "myLanguage",
+ "logLevel": "info",
+ "output": Array [
+ "yuno.pdf",
+ "yuno",
+ ],
+ "proxyBypass": ".example.com",
+ "proxyPass": "proxy-auth-password",
+ "proxyServer": "http://localhost:3128",
+ "proxyUser": "proxy-auth-user",
+ "size": "JIS-B5",
+ "style": "https://vivlostyle.org",
+ "targets": Array [
+ Object {
+ "format": "pdf",
+ "path": "yuno.pdf",
+ },
+ Object {
+ "format": "webpub",
+ "path": "yuno",
+ },
+ ],
+ "theme": "https://myTheme.example.com",
+ "timeout": 42000,
+ "title": "myTitle",
+ "userStyle": "./user/style/dummy.css",
+ "viewer": "https://vivliostyle.org/viewer/",
+ "viewerParam": "allowScripts=false&pixelRatio=16",
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -59,35 +101,43 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "https://myTheme.example.com",
"name": "myTheme.example.com",
"type": "uri",
},
],
"title": "myTitle",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -129,10 +179,14 @@
"name": "myTheme.example.com",
"type": "uri",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "JIS-B5",
},
"themeIndexes": Set {
@@ -149,10 +203,11 @@
},
},
"themesDir": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes",
"timeout": 42000,
"title": "myTitle",
+ "tmpPrefix": ".vs-1734236459342.",
"vfmOptions": Object {
"disableFormatHtml": true,
"hardLineBreaks": true,
},
"viewer": "https://vivliostyle.org/viewer/",
❯ tests/config.test.ts:87:18
|
tests/config.test.ts > override option by environment variable:
tests/config.test.ts#L98
Error: Snapshot `override option by environment variable > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -131,25 +148,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/de
|
tests/config.test.ts > Loads same config file on each way:
tests/config.test.ts#L122
AssertionError: expected { …(44) } to deeply equal { …(44) }
- Expected
+ Received
Object {
"author": "author",
"base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
"cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"input": undefined,
"logLevel": "info",
"targets": Array [],
},
"context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
"jpeg",
"svg",
"gif",
"webp",
"apng",
"ttf",
"otf",
"woff",
"woff2",
"zip",
],
"includes": Array [
"xx/yy",
"**/zz",
],
},
"cover": Object {
"htmlPath": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"name": "Cover image alt",
"src": "__WORKSPACE__/tests/fixtures/config/cover.png",
},
"cropMarks": false,
"cropOffset": undefined,
"css": undefined,
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function VFM],
"entries": Array [
Object {
"coverImageAlt": "Cover image alt",
"coverImageSrc": "__WORKSPACE__/tests/fixtures/config/cover.png",
"rel": "cover",
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"themes": Array [],
"title": "title",
},
Object {
"rel": "contents",
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"tocTitle": "TOC",
"transform": Object {
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
"httpServer": false,
"ignoreHttpsErrors": false,
"image": "__IMAGE__",
"input": Object {
"entry": "__WORKSPACE__/tests/fixtures/config/workspaceDir/publication.json",
"format": "pub-manifest",
},
"language": "language",
"logLevel": "info",
"manifestPath"
|
tests/config.test.ts > yields a config with single markdown:
tests/config.test.ts#L150
Error: Snapshot `yields a config with single markdown 1` mismatched
- Expected
+ Received
@@ -1,9 +1,17 @@
Object {
"author": undefined,
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "chromium",
+ "cliFlags": Object {
+ "configPath": undefined,
+ "input": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests",
"copyAsset": Object {
"excludes": Array [],
"fileExtensions": Array [
"png",
"jpg",
@@ -26,15 +34,19 @@
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function],
"entries": Array [
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "type": "file",
+ },
"target": "__SNIP__",
"themes": Array [],
"title": "Yuno",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": "__SNIP__",
@@ -61,16 +73,21 @@
"proxy": undefined,
"quick": false,
"readingProgression": undefined,
"rootThemes": Array [],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": undefined,
"themeIndexes": Set {},
"themesDir": "__WORKSPACE__/tests/fixtures/config/themes",
"timeout": 120000,
"title": "Yuno",
+ "tmpPrefix": ".vs-1734236459514.",
"vfmOptions": Object {
"disableFormatHtml": false,
"hardLineBreaks": false,
},
"viewer": undefined,
❯ tests/config.test.ts:150:18
|
tests/builder.test.ts > generate workspace directory:
tests/builder.test.ts#L45
AssertionError: expected Set{ 'cover.html', 'index.html', …(10) } to deeply equal Set{ 'index.html', 'cover.html', …(10) }
- Expected
+ Received
Set {
"cover.html",
"index.html",
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-theme.css",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:45:29
|
tests/builder.test.ts > generate from various manuscript formats:
tests/builder.test.ts#L227
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-html.html",
"manuscript/sample-xhtml.xhtml",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:227:29
|
tests/builder.test.ts > install local themes:
tests/builder.test.ts#L561
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/soda.html",
"manuscript/theme-reference.html",
"publication.json",
"sample-theme.css",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:561:29
|
tests/builder.test.ts > install remote themes:
tests/builder.test.ts#L631
AssertionError: expected [ 'publication.json', …(39) ] to include 'themes/packages/@vivliostyle/theme-ac…'
❯ tests/builder.test.ts:631:20
|
tests/builder.test.ts > use multiple themes:
tests/builder.test.ts#L678
AssertionError: expected [ …(3) ] to deeply equal [ …(3) ]
- Expected
+ Received
Array [
- "../themes/packages/debug-theme/theme.css",
- "../themes/packages/debug-theme/additional-theme.css",
+ "../themes/node_modules/debug-theme/theme.css",
+ "../themes/node_modules/debug-theme/additional-theme.css",
"sample-theme.css",
]
❯ tests/builder.test.ts:678:5
|
tests/config.test.ts > parse vivliostyle config:
tests/config.test.ts#L30
Error: Snapshot `parse vivliostyle config > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -126,25 +143,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+
|
tests/config.test.ts > override option by CLI command:
tests/config.test.ts#L87
Error: Snapshot `override option by CLI command > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,51 @@
Object {
"author": "myAuthor",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "author": "myAuthor",
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
+ "format": Array [
+ "webpub",
+ ],
+ "http": true,
+ "ignoreHttpsErrors": true,
+ "input": undefined,
+ "language": "myLanguage",
+ "logLevel": "info",
+ "output": Array [
+ "yuno.pdf",
+ "yuno",
+ ],
+ "proxyBypass": ".example.com",
+ "proxyPass": "proxy-auth-password",
+ "proxyServer": "http://localhost:3128",
+ "proxyUser": "proxy-auth-user",
+ "size": "JIS-B5",
+ "style": "https://vivlostyle.org",
+ "targets": Array [
+ Object {
+ "format": "pdf",
+ "path": "yuno.pdf",
+ },
+ Object {
+ "format": "webpub",
+ "path": "yuno",
+ },
+ ],
+ "theme": "https://myTheme.example.com",
+ "timeout": 42000,
+ "title": "myTitle",
+ "userStyle": "./user/style/dummy.css",
+ "viewer": "https://vivliostyle.org/viewer/",
+ "viewerParam": "allowScripts=false&pixelRatio=16",
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -59,35 +101,43 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "https://myTheme.example.com",
"name": "myTheme.example.com",
"type": "uri",
},
],
"title": "myTitle",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -129,10 +179,14 @@
"name": "myTheme.example.com",
"type": "uri",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "JIS-B5",
},
"themeIndexes": Set {
@@ -149,10 +203,11 @@
},
},
"themesDir": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes",
"timeout": 42000,
"title": "myTitle",
+ "tmpPrefix": ".vs-1734236505993.",
"vfmOptions": Object {
"disableFormatHtml": true,
"hardLineBreaks": true,
},
"viewer": "https://vivliostyle.org/viewer/",
❯ tests/config.test.ts:87:18
|
tests/config.test.ts > override option by environment variable:
tests/config.test.ts#L98
Error: Snapshot `override option by environment variable > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -131,25 +148,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/de
|
tests/config.test.ts > Loads same config file on each way:
tests/config.test.ts#L122
AssertionError: expected { …(44) } to deeply equal { …(44) }
- Expected
+ Received
Object {
"author": "author",
"base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
"cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"input": undefined,
"logLevel": "info",
"targets": Array [],
},
"context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
"jpeg",
"svg",
"gif",
"webp",
"apng",
"ttf",
"otf",
"woff",
"woff2",
"zip",
],
"includes": Array [
"xx/yy",
"**/zz",
],
},
"cover": Object {
"htmlPath": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"name": "Cover image alt",
"src": "__WORKSPACE__/tests/fixtures/config/cover.png",
},
"cropMarks": false,
"cropOffset": undefined,
"css": undefined,
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function VFM],
"entries": Array [
Object {
"coverImageAlt": "Cover image alt",
"coverImageSrc": "__WORKSPACE__/tests/fixtures/config/cover.png",
"rel": "cover",
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"themes": Array [],
"title": "title",
},
Object {
"rel": "contents",
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"tocTitle": "TOC",
"transform": Object {
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
"httpServer": false,
"ignoreHttpsErrors": false,
"image": "__IMAGE__",
"input": Object {
"entry": "__WORKSPACE__/tests/fixtures/config/workspaceDir/publication.json",
"format": "pub-manifest",
},
"language": "language",
"logLevel": "info",
"manifestPath"
|
tests/config.test.ts > yields a config with single markdown:
tests/config.test.ts#L150
Error: Snapshot `yields a config with single markdown 1` mismatched
- Expected
+ Received
@@ -1,9 +1,17 @@
Object {
"author": undefined,
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "chromium",
+ "cliFlags": Object {
+ "configPath": undefined,
+ "input": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests",
"copyAsset": Object {
"excludes": Array [],
"fileExtensions": Array [
"png",
"jpg",
@@ -26,15 +34,19 @@
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function],
"entries": Array [
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "type": "file",
+ },
"target": "__SNIP__",
"themes": Array [],
"title": "Yuno",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": "__SNIP__",
@@ -61,16 +73,21 @@
"proxy": undefined,
"quick": false,
"readingProgression": undefined,
"rootThemes": Array [],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": undefined,
"themeIndexes": Set {},
"themesDir": "__WORKSPACE__/tests/fixtures/config/themes",
"timeout": 120000,
"title": "Yuno",
+ "tmpPrefix": ".vs-1734236506287.",
"vfmOptions": Object {
"disableFormatHtml": false,
"hardLineBreaks": false,
},
"viewer": undefined,
❯ tests/config.test.ts:150:18
|
tests/builder.test.ts > generate workspace directory:
tests/builder.test.ts#L45
AssertionError: expected Set{ 'cover.html', 'index.html', …(10) } to deeply equal Set{ 'index.html', 'cover.html', …(10) }
- Expected
+ Received
Set {
"cover.html",
"index.html",
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-theme.css",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:45:29
|
tests/builder.test.ts > generate from various manuscript formats:
tests/builder.test.ts#L227
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/sample-html.html",
"manuscript/sample-xhtml.xhtml",
"manuscript/soda.html",
"publication.json",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:227:29
|
tests/builder.test.ts > install local themes:
tests/builder.test.ts#L561
AssertionError: expected Set{ 'publication.json', …(10) } to deeply equal Set{ 'manuscript/cover.png', …(10) }
- Expected
+ Received
Set {
"manuscript/cover.png",
"manuscript/cover2.png",
"manuscript/soda.html",
"manuscript/theme-reference.html",
"publication.json",
"sample-theme.css",
+ "themes/node_modules/debug-theme/additional-theme.css",
+ "themes/node_modules/debug-theme/package.json",
+ "themes/node_modules/debug-theme/theme.css",
"themes/package-lock.json",
"themes/package.json",
- "themes/packages/debug-theme/additional-theme.css",
- "themes/packages/debug-theme/package.json",
- "themes/packages/debug-theme/theme.css",
}
❯ tests/builder.test.ts:561:29
|
tests/builder.test.ts > install remote themes:
tests/builder.test.ts#L631
AssertionError: expected [ 'publication.json', …(39) ] to include 'themes/packages/@vivliostyle/theme-ac…'
❯ tests/builder.test.ts:631:20
|
tests/builder.test.ts > use multiple themes:
tests/builder.test.ts#L678
AssertionError: expected [ …(3) ] to deeply equal [ …(3) ]
- Expected
+ Received
Array [
- "../themes/packages/debug-theme/theme.css",
- "../themes/packages/debug-theme/additional-theme.css",
+ "../themes/node_modules/debug-theme/theme.css",
+ "../themes/node_modules/debug-theme/additional-theme.css",
"sample-theme.css",
]
❯ tests/builder.test.ts:678:5
|
tests/config.test.ts > parse vivliostyle config:
tests/config.test.ts#L30
Error: Snapshot `parse vivliostyle config > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -126,25 +143,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+
|
tests/config.test.ts > override option by CLI command:
tests/config.test.ts#L87
Error: Snapshot `override option by CLI command > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,51 @@
Object {
"author": "myAuthor",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "author": "myAuthor",
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
+ "format": Array [
+ "webpub",
+ ],
+ "http": true,
+ "ignoreHttpsErrors": true,
+ "input": undefined,
+ "language": "myLanguage",
+ "logLevel": "info",
+ "output": Array [
+ "yuno.pdf",
+ "yuno",
+ ],
+ "proxyBypass": ".example.com",
+ "proxyPass": "proxy-auth-password",
+ "proxyServer": "http://localhost:3128",
+ "proxyUser": "proxy-auth-user",
+ "size": "JIS-B5",
+ "style": "https://vivlostyle.org",
+ "targets": Array [
+ Object {
+ "format": "pdf",
+ "path": "yuno.pdf",
+ },
+ Object {
+ "format": "webpub",
+ "path": "yuno",
+ },
+ ],
+ "theme": "https://myTheme.example.com",
+ "timeout": 42000,
+ "title": "myTitle",
+ "userStyle": "./user/style/dummy.css",
+ "viewer": "https://vivliostyle.org/viewer/",
+ "viewerParam": "allowScripts=false&pixelRatio=16",
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -59,35 +101,43 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "https://myTheme.example.com",
"name": "myTheme.example.com",
"type": "uri",
},
],
"title": "myTitle",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -129,10 +179,14 @@
"name": "myTheme.example.com",
"type": "uri",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "JIS-B5",
},
"themeIndexes": Set {
@@ -149,10 +203,11 @@
},
},
"themesDir": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes",
"timeout": 42000,
"title": "myTitle",
+ "tmpPrefix": ".vs-1734236542246.",
"vfmOptions": Object {
"disableFormatHtml": true,
"hardLineBreaks": true,
},
"viewer": "https://vivliostyle.org/viewer/",
❯ tests/config.test.ts:87:18
|
tests/config.test.ts > override option by environment variable:
tests/config.test.ts#L98
Error: Snapshot `override option by environment variable > valid.1.config.js 1` mismatched
- Expected
+ Received
@@ -1,9 +1,18 @@
Object {
"author": "author",
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
+ "cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
+ "input": undefined,
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
@@ -48,11 +57,11 @@
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
@@ -61,37 +70,45 @@
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
- "type": "text/markdown",
+ },
+ Object {
+ "contentType": "text/markdown",
- },
- Object {
+ "source": Object {
- "source": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
+ "type": "file",
+ },
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
@@ -131,25 +148,29 @@
"quick": false,
"readingProgression": "rtl",
"rootThemes": Array [
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/debug-theme",
+ "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": Object {
"format": "size",
},
"themeIndexes": Set {
Object {
"importPath": undefined,
- "location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/packages/de
|
tests/config.test.ts > Loads same config file on each way:
tests/config.test.ts#L122
AssertionError: expected { …(44) } to deeply equal { …(44) }
- Expected
+ Received
Object {
"author": "author",
"base": "/vivliostyle",
"bleed": undefined,
"browserType": "firefox",
"cliFlags": Object {
+ "config": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"configPath": "__WORKSPACE__/tests/fixtures/config/vivliostyle.config.valid.1.cjs",
"input": undefined,
"logLevel": "info",
"targets": Array [],
},
"context": "__WORKSPACE__/tests/fixtures/config",
"copyAsset": Object {
"excludes": Array [
"*a*",
],
"fileExtensions": Array [
"jpeg",
"svg",
"gif",
"webp",
"apng",
"ttf",
"otf",
"woff",
"woff2",
"zip",
],
"includes": Array [
"xx/yy",
"**/zz",
],
},
"cover": Object {
"htmlPath": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"name": "Cover image alt",
"src": "__WORKSPACE__/tests/fixtures/config/cover.png",
},
"cropMarks": false,
"cropOffset": undefined,
"css": undefined,
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function VFM],
"entries": Array [
Object {
"coverImageAlt": "Cover image alt",
"coverImageSrc": "__WORKSPACE__/tests/fixtures/config/cover.png",
"rel": "cover",
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/mycover.html",
"themes": Array [],
"title": "title",
},
Object {
"rel": "contents",
"sectionDepth": 6,
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/toc.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"tocTitle": "TOC",
"transform": Object {
"transformDocumentList": undefined,
"transformSectionList": undefined,
},
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"importPath": undefined,
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/themes/node_modules/debug-theme",
"name": "debug-theme",
"specifier": "__WORKSPACE__/tests/fixtures/themes/debug-theme",
"type": "package",
},
],
"title": "title",
},
Object {
"contentType": "text/markdown",
"source": Object {
"contentType": "text/markdown",
"pathname": "__WORKSPACE__/tests/fixtures/config/manuscript.md",
"type": "file",
},
"target": "__WORKSPACE__/tests/fixtures/config/workspaceDir/manuscript.html",
"themes": Array [
Object {
"location": "__WORKSPACE__/tests/fixtures/config/workspaceDir/theme.css",
"name": "theme.css",
"source": "__WORKSPACE__/tests/fixtures/config/theme.css",
"type": "file",
},
],
"title": "title",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": Array [],
"httpServer": false,
"ignoreHttpsErrors": false,
"image": "__IMAGE__",
"input": Object {
"entry": "__WORKSPACE__/tests/fixtures/config/workspaceDir/publication.json",
"format": "pub-manifest",
},
"language": "language",
"logLevel": "info",
"manifestPath"
|
tests/config.test.ts > yields a config with single markdown:
tests/config.test.ts#L150
Error: Snapshot `yields a config with single markdown 1` mismatched
- Expected
+ Received
@@ -1,9 +1,17 @@
Object {
"author": undefined,
+ "base": "/vivliostyle",
"bleed": undefined,
"browserType": "chromium",
+ "cliFlags": Object {
+ "configPath": undefined,
+ "input": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "logLevel": "info",
+ "targets": Array [],
+ },
+ "context": "__WORKSPACE__/tests",
"copyAsset": Object {
"excludes": Array [],
"fileExtensions": Array [
"png",
"jpg",
@@ -26,15 +34,19 @@
"customStyle": undefined,
"customUserStyle": undefined,
"documentProcessorFactory": [Function],
"entries": Array [
Object {
- "source": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "contentType": "text/markdown",
+ "source": Object {
+ "contentType": "text/markdown",
+ "pathname": "__WORKSPACE__/tests/fixtures/config/sample.md",
+ "type": "file",
+ },
"target": "__SNIP__",
"themes": Array [],
"title": "Yuno",
- "type": "text/markdown",
},
],
"entryContextDir": "__WORKSPACE__/tests/fixtures/config",
"executableBrowser": "__EXECUTABLE_CHROMIUM_PATH__",
"exportAliases": "__SNIP__",
@@ -61,16 +73,21 @@
"proxy": undefined,
"quick": false,
"readingProgression": undefined,
"rootThemes": Array [],
"sandbox": false,
+ "server": Object {
+ "host": false,
+ "port": 13000,
+ },
"singleDoc": false,
"size": undefined,
"themeIndexes": Set {},
"themesDir": "__WORKSPACE__/tests/fixtures/config/themes",
"timeout": 120000,
"title": "Yuno",
+ "tmpPrefix": ".vs-1734236542418.",
"vfmOptions": Object {
"disableFormatHtml": false,
"hardLineBreaks": false,
},
"viewer": undefined,
❯ tests/config.test.ts:150:18
|
build-and-test (22, ubuntu-latest)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
build-and-test (20, ubuntu-latest)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
build-and-test (18, ubuntu-latest)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
build-and-push-image
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|