Skip to content

Commit

Permalink
fix: make tests work on windows
Browse files Browse the repository at this point in the history
Tests were not running because some path parser didn't understand
apostrophes so I've just converted those to escaped quotes.

Some pre-mfs-scope tests failed because path.join presumes we want paths
for the current running OS. I changed it to always use posix paths but
I'm open to arguments that changing the implementation is a better
approach. All of our target environments use posix paths, I believe.
  • Loading branch information
JonKrone committed Apr 14, 2018
1 parent c757dcf commit 0e800fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion add-on/src/lib/ipfs-proxy/pre-mfs-scope.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Path = require('path')
const Path = require('path').posix
const DEFAULT_ROOT_PATH = '/dapps'

// Creates a "pre" function that is called prior to calling a real function
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"watch:content-scripts:ipfs-proxy:page": "watchify -p prundupify -t [ browserify-package-json --global ] add-on/src/contentScripts/ipfs-proxy/page.js -o add-on/dist/contentScripts/ipfs-proxy/page.js -v",
"watch:content-scripts:ipfs-proxy:content": "nodemon --exec \"browserify -p prundupify -t brfs -t [ browserify-package-json --global ] -s IpfsProxyContent add-on/src/contentScripts/ipfs-proxy/content.js -o add-on/dist/contentScripts/ipfs-proxy/content.js -v\" --watch add-on/src/contentScripts/ipfs-proxy/content.js --watch add-on/dist/contentScripts/ipfs-proxy/page.js",
"test": "run-s test:*",
"test:functional": " nyc --reporter=lcov --reporter=text mocha --timeout 15000 --require ignore-styles --reporter mocha-jenkins-reporter 'test/functional/**/*.test.js'",
"test:functional": " nyc --reporter=lcov --reporter=text mocha --timeout 15000 --require ignore-styles --reporter mocha-jenkins-reporter \"test/functional/**/*.test.js\"",
"lint": "run-s lint:*",
"lint:standard": "standard -v \"add-on/src/**/*.js\" \"test/**/*.js\"",
"lint:web-ext": "web-ext lint",
Expand Down

0 comments on commit 0e800fe

Please sign in to comment.