eykrehbein / strest

⚡️ CI-ready tests for REST APIs configured in YAML
MIT License
1.74k stars 59 forks source link

fix windows-only schema validation error #105

Closed philippevk closed 5 years ago

philippevk commented 5 years ago

the original code always produce relativePath="" on windows

const removeFilename = filePath.substring(0, filePath.lastIndexOf("/") + 1);
parsed.relativePath = removeFilename.replace(path.join(process.cwd(), dir), "./")

lastIndexOf("/") is -1, so substring is called as substring(0, 0)

also fixed inconsistent quotes, semicolon and space-before-bracket :)

jgroom33 commented 5 years ago

i think this also fixed a behavior that would result in .// showing as the path in the logs sometimes.

Nice work :)

philippevk commented 5 years ago

Thanks for quickly processing the PR!

When do you think 1.17.3 will be available on npm? I actually have no idea how packages get updated. Is this something you do manually?

jgroom33 commented 5 years ago

I thought it was immediate. @eykrehbein is there a manual step to publishing to npm? It hits docker as soon as it is tagged on git: https://hub.docker.com/r/eykrehbein/strest/tags/

jgroom33 commented 5 years ago

created #106

philippevk commented 5 years ago

thanks :)