mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-05 18:43:47 +00:00
Use selenium for tests instead of phantomjs
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
17
readme.md
17
readme.md
@@ -62,12 +62,25 @@ please do not commit changes to `bip39-standalone.html`
|
||||
|
||||
# Tests
|
||||
|
||||
Tests depend on [phantomjs](http://phantomjs.org/).
|
||||
Tests depend on
|
||||
|
||||
* nodejs
|
||||
* selenium webdriver - cd /path/to/bip39/tests; npm install
|
||||
* selenium driver for firefox ([geckodriver](https://github.com/mozilla/geckodriver/releases)) and / or chrome ([chromedriver](https://sites.google.com/a/chromium.org/chromedriver/downloads))
|
||||
* jasmine - npm install --global jasmine
|
||||
|
||||
Before running tests, the site must be served at http://localhost:8000.
|
||||
|
||||
```
|
||||
$ cd /path/to/bip39/src
|
||||
$ python -m http.server
|
||||
```
|
||||
|
||||
Run tests from the command-line
|
||||
|
||||
```
|
||||
$ phantomjs tests.js
|
||||
$ cd /path/to/bip39/tests
|
||||
$ jasmine spec/tests.js
|
||||
```
|
||||
|
||||
# License
|
||||
|
||||
17
tests/package.json
Normal file
17
tests/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "tests",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"test": "node tests.js"
|
||||
},
|
||||
"author": "Ian coleman",
|
||||
"description": "Tests for BIP39 tool",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/iancoleman/bip39.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"selenium-webdriver": "^3.6.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
11
tests/spec/support/jasmine.json
Normal file
11
tests/spec/support/jasmine.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"spec_dir": "spec",
|
||||
"spec_files": [
|
||||
"**/*[sS]pec.js"
|
||||
],
|
||||
"helpers": [
|
||||
"helpers/**/*.js"
|
||||
],
|
||||
"stopSpecOnExpectationFailure": false,
|
||||
"random": false
|
||||
}
|
||||
2566
tests/spec/tests.js
Normal file
2566
tests/spec/tests.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user