asciidoctor / asciidoctor-kroki

Asciidoctor.js extension to convert diagrams to images using Kroki!
https://kroki.io/
MIT License
146 stars 47 forks source link

'npm run test' failed @ windows #68

Closed anb0s closed 4 years ago

anb0s commented 4 years ago

I've tried the Contributing description @ Windows 10 with fresh clone and versions:

Executed:

$ npm run test

> asciidoctor-kroki@0.8.2 test C:\Users\kenobi\dev\asciidoctor-kroki
> npm run test:node && npm run test:browser

> asciidoctor-kroki@0.8.2 test:node C:\Users\kenobi\dev\asciidoctor-kroki
> mocha test/*.js

  preprocessVegaLite
    √ should throw an error for invalid JSON
    √ should return original diagramText for valid JSON but without "data.url"
    √ should throw an error for unexisting local file referenced with relative path
    √ should throw an error for unexisting local file referenced with "file://"
Skipping preprocessing of Vega-Lite view specification, because reading the referenced remote file 'https://raw.githubusercontent.com/Mogztter/asciidoctor-kroki/master/unexisting.csv' caused an error:
Error: No such file: https://raw.githubusercontent.com/Mogztter/asciidoctor-kroki/master/unexisting.csv
    √ should warn and return original diagramText for unexisting remote file referenced with "data.url", because it can perhaps be found by kroki server (354ms)
    1) should return diagramText with inlined local file referenced with "data.url"
    √ should return diagramText with inlined remote file referenced with "data.url" (355ms)

  Registration
    √ should register the extension

  Conversion
    When extension is registered
      √ should convert a diagram to an image (45ms)
      2) should convert a diagram with an absolute path to an image
      3) should convert a diagram with a relative path to an image
      √ should download and save an image to a local folder (353ms)
      √ should apply substitutions in diagram block
      4) should apply attributes substitution in target
      √ should not download twice the same image (322ms)
      √ should create a literal block when format is txt (285ms)
      √ should read diagram text
      √ should embed an SVG image with built-in allow-uri-read and data-uri (available in Asciidoctor.js 2+) (1034ms)
      √ should inline an SVG image with built-in allow-uri-read (available in Asciidoctor.js 2+) (369ms)
      √ should inline an SVG image with kroki-fetch-diagram (952ms)
      √ should include an interactive SVG image with built-in allow-uri-read and data-uri (available in Asciidoctor.js 2+) (1049ms)
      5) should include an interactive SVG image with kroki-fetch-diagram
      √ should convert a PacketDiag diagram to an image
      √ should convert a RackDiag diagram to an image
      √ should convert a Vega diagram to an image
      √ should convert a Vega-Lite diagram to an image
      6) should inline a referenced data file for a Vega-Lite diagram and convert to an image
      √ should convert a WaveDrom diagram to an image
      √ should convert a BPMN diagram to an image
      √ should convert a Bytefield diagram to an image
ggrossetie commented 4 years ago

Fixed in https://github.com/Mogztter/asciidoctor-kroki/commit/04fc17556b6509fdb64ed0bdbf66b907f5272f89