This repository was archived by the owner on Mar 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 296
Start implementing browser tests using karma #78
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e5ddc7f
Start implementing browser tests using karma
dignifiedquire 700d6f6
Spawn ipfs node for running tests
dignifiedquire a184f1a
Ready for travis
dignifiedquire 105fb32
Fix path
dignifiedquire 1934220
another try
dignifiedquire 2ea7f73
fix
dignifiedquire dc39d98
fix
dignifiedquire 1665b27
fix3
dignifiedquire 11b07d3
Add saucelabs support
dignifiedquire 6ddd117
Remove debugging cmd
dignifiedquire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
language: node_js | ||
node_js: | ||
- "4.0" | ||
|
||
before_script: | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
module.exports = function (config) { | ||
if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) { | ||
console.log('Make sure the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are set.') | ||
process.exit(1) | ||
} | ||
|
||
// Browsers to run on Sauce Labs | ||
// Check out https://saucelabs.com/platforms for all browser/OS combos | ||
var customLaunchers = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should probably have something running on Linux as well, just in case. Might be overkill though There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Launcher list should be bigger anyway probably, but just wanted to add sth for now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair enough |
||
'SL_Chrome': { | ||
base: 'SauceLabs', | ||
platform: 'OS X 10.11', | ||
browserName: 'chrome' | ||
}, | ||
'SL_Firefox': { | ||
base: 'SauceLabs', | ||
platform: 'OS X 10.11', | ||
browserName: 'firefox' | ||
}, | ||
'SL_Safari': { | ||
base: 'SauceLabs', | ||
platform: 'OS X 10.11', | ||
browserName: 'safari' | ||
}, | ||
'SL_Edge': { | ||
base: 'SauceLabs', | ||
platform: 'Windows 10', | ||
browserName: 'microsoftedge' | ||
}, | ||
'SL_IE11': { | ||
base: 'SauceLabs', | ||
platform: 'Windows 10', | ||
browserName: 'internet explorer', | ||
version: '11.0' | ||
} | ||
} | ||
|
||
config.set({ | ||
basePath: '', | ||
frameworks: ['browserify', 'mocha'], | ||
files: [ | ||
'test/test.js' | ||
], | ||
exclude: [], | ||
preprocessors: { | ||
'test/**/*.js': ['browserify'] | ||
}, | ||
|
||
browserify: { | ||
debug: true, | ||
transform: [ | ||
'brfs' | ||
] | ||
}, | ||
|
||
sauceLabs: { | ||
testName: 'node-ipfs-api', | ||
recordScreenshots: false, | ||
connectOptions: { | ||
port: 5757, | ||
logfile: 'sauce_connect.log' | ||
} | ||
}, | ||
|
||
reporters: ['progress', 'saucelabs'], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: false, | ||
customLaunchers: customLaunchers, | ||
browsers: Object.keys(customLaunchers), | ||
singleRun: false, | ||
concurrency: 2 | ||
}) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll need this to be able to run in local? I think this should be optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, not sure of the best way to do that, suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract the SauceLabs specific parts that only get added if
process.env.SAUCE_USERNAME
andSAUCE_ACCESS_KEY
is set would be a simple way to achieve it.