Skip to content

ci: run test on ubuntu and windows #158

ci: run test on ubuntu and windows

ci: run test on ubuntu and windows #158

Triggered via pull request July 23, 2024 02:04
Status Failure
Total duration 1m 21s
Artifacts

main.yml

on: pull_request
Matrix: build_and_test
Fit to window
Zoom out
Zoom in

Annotations

10 errors
test/cli.spec.ts > cli > should throw an error if the directory cannot be created: test/cli.spec.ts#L39
AssertionError: promise resolved "{ …(17) }" instead of rejecting - Expected + Received - [Error: rejected promise] + Object { + "command": "node dist/cli.js http://example.com/image.webp --dir=/root", + "cwd": "D:\\a\\img-dl\\img-dl", + "durationMs": 399.9954, + "escapedCommand": "node dist/cli.js \"http://example.com/image.webp\" \"--dir=/root\"", + "exitCode": 0, + "failed": false, + "ipcOutput": Array [], + "isCanceled": false, + "isForcefullyTerminated": false, + "isGracefullyCanceled": false, + "isMaxBuffer": false, + "isTerminated": false, + "pipedFrom": Array [], + "stderr": "", + "stdio": Array [ + undefined, + " + Downloading... + Press Ctrl+C to abort + Done! + 1 image failed to download. See ./error.log for details.", + "", + ], + "stdout": " + Downloading... + Press Ctrl+C to abort + Done! + 1 image failed to download. See ./error.log for details.", + "timedOut": false, + } ❯ test/cli.spec.ts:39:60
test/downloader.spec.ts > parseImageParams > should set a valid normalized directory: `images/`: test/downloader.spec.ts#L77
AssertionError: expected 'images\' to be 'images/' // Object.is equality - Expected + Received - images/ + images\ ❯ test/downloader.spec.ts:77:30
test/downloader.spec.ts > parseImageParams > should set a valid normalized directory: `images/me`: test/downloader.spec.ts#L77
AssertionError: expected 'images\me' to be 'images/me' // Object.is equality - Expected + Received - images/me + images\me ❯ test/downloader.spec.ts:77:30
test/downloader.spec.ts > parseImageParams > should set a valid normalized directory: `images/me/`: test/downloader.spec.ts#L77
AssertionError: expected 'images\me\' to be 'images/me/' // Object.is equality - Expected + Received - images/me/ + images\me\ ❯ test/downloader.spec.ts:77:30
test/downloader.spec.ts > parseImageParams > should set a valid normalized directory: `./images/`: test/downloader.spec.ts#L77
AssertionError: expected 'images\' to be 'images/' // Object.is equality - Expected + Received - images/ + images\ ❯ test/downloader.spec.ts:77:30
test/downloader.spec.ts > parseImageParams > should set a valid normalized directory: `test/../images/`: test/downloader.spec.ts#L77
AssertionError: expected 'images\' to be 'images/' // Object.is equality - Expected + Received - images/ + images\ ❯ test/downloader.spec.ts:77:30
test/downloader.spec.ts > `download` > should throw an error if directory cannot be created: test/downloader.spec.ts#L236
AssertionError: promise resolved "{ url: URL{}, name: 'image (1)', …(5) }" instead of rejecting - Expected + Received - [Error: rejected promise] + Object { + "directory": "\\restricted-dir", + "extension": "jpg", + "name": "image (1)", + "originalExtension": "jpg", + "originalName": "image", + "path": "D:\\restricted-dir\\image (1).jpg", + "url": "https://example.com/image.jpg", + } ❯ test/downloader.spec.ts:236:33
test/index.spec.ts > `imgdl` > should download an image with specific image options: test/index.spec.ts#L79
AssertionError: expected { url: URL{}, name: 'myimage', …(5) } to strictly equal { directory: 'test/tmp/images', …(6) } - Expected + Received Object { - "directory": "test/tmp/images", + "directory": "test\\tmp\\images", "extension": "png", "name": "myimage", "originalExtension": "jpg", "originalName": "image", "path": "D:\\a\\img-dl\\img-dl\\test\\tmp\\images\\myimage.png", "url": "https://example.com/image.jpg", } ❯ test/index.spec.ts:79:19
test/index.spec.ts > `imgdl` > should not throw error if directory cannot be created: test/index.spec.ts#L103
AssertionError: expected undefined to be an instance of DirectoryError ❯ test/index.spec.ts:103:19
test/index.spec.ts > `imgdl` > should download multiple images if array of URLs is provided with options: test/index.spec.ts#L213
AssertionError: expected [ { url: URL{}, …(6) }, …(1) ] to strictly equal [ { url: URL{}, …(6) }, …(1) ] - Expected + Received Array [ Object { - "directory": "test/tmp", + "directory": "test\\tmp", "extension": "png", "name": "myimage", "originalExtension": "jpg", "originalName": "img-1", "path": "D:\\a\\img-dl\\img-dl\\test\\tmp\\myimage.png", "url": "https://example.com/img-1.jpg", }, Object { - "directory": "test/tmp", + "directory": "test\\tmp", "extension": "png", "name": "myimage (1)", "originalExtension": "jpg", "originalName": "img-2", "path": "D:\\a\\img-dl\\img-dl\\test\\tmp\\myimage (1).png", "url": "https://example.com/img-2.jpg", }, ] ❯ test/index.spec.ts:213:20