dwyl / learn-json-web-tokens

:closed_lock_with_key: Learn how to use JSON Web Token (JWT) to secure your next Web App! (Tutorial/Example with Tests!!)
MIT License
4.18k stars 254 forks source link

File-paths error on path.resolve #51

Closed JackTierney closed 8 years ago

JackTierney commented 8 years ago

On cloning exactly the same repo on two different operating systems (mac and ubuntu) and running the tests, the test pass out of the box on the mac, however we have to change the file path on the Ubuntu.

https://github.com/dwyl/learn-json-web-tokens/blob/master/example/lib/helpers.js#L12

to get the tests to run on the Ubuntu we changed the file path to:

var filepath = path.resolve(__dirname + '/../views/' + view + '.html');
nelsonic commented 8 years ago

@JackTierney that change should work on Mac too, so feel free to make a Pull Request with the change. :+1:

nelsonic commented 8 years ago

@JackTierney don't forget to :star: :wink: