forked from WebKit/Speedometer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dbff607
commit 42b6dd8
Showing
7 changed files
with
681 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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 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 @@ | ||
engine-strict = true |
This file contains 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,28 @@ | ||
# Development Environment | ||
|
||
## Prerequisite | ||
Node is required for local development. | ||
We recommend using a Node version manager ([nvm](https://github.com/nvm-sh/nvm) for example) to ensure a stable development environment is used. | ||
Below are the required node / npm versions: | ||
```sh | ||
"node": ">18.13.0", | ||
"npm": ">8.19.3" | ||
```` | ||
|
||
## Installation | ||
In your working directory, open terminal and paste the following commands: | ||
```sh | ||
git clone https://github.com/WebKit/Speedometer.git | ||
cd Speedometer | ||
npm install | ||
```` | ||
## Run Development Server | ||
1. In your terminal run: | ||
```sh | ||
npm run dev | ||
```` | ||
2. Open your browser of choice and navigate to [http://127.0.0.1:7000](http://127.0.0.1:7000) | ||
|
||
## Local Server | ||
Speedometer uses [http-server](https://github.com/http-party/http-server), which is a static HTTP server. Meaning it does not provide hot-reloading. By default, the dev script disables caching and local changes can be viewed by simply refreshing your browser window. Additional options of the http-server can be found [here](https://github.com/http-party/http-server#available-options). |
This file contains 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,24 @@ | ||
# Testing | ||
|
||
Speedometer uses [Selenium](https://www.selenium.dev/) for testing of the application itself. | ||
Tests are located in the ``/tests`` folder. | ||
|
||
[Sinon](https://sinonjs.org/): Standalone test spies, stubs and mocks for JavaScript. | ||
[Mocha](https://mochajs.org/): Testing framework. | ||
|
||
## Local Testing | ||
|
||
To run this locally you'll need the browsers installed along with the corresponding driver: | ||
- [chromedriver](https://chromedriver.chromium.org/getting-started) | ||
- [geckodriver](https://github.com/mozilla/geckodriver/releases) | ||
- [safaridriver](https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari). | ||
|
||
Once installed you can run the following scripts: | ||
````bash | ||
npm run test:chrome | ||
npm run test:firefox | ||
npm run test:safari | ||
```` | ||
|
||
## Automated Testing | ||
Currently Speedometer's tests run automatically, when pushing to the main branch or when opening a pr. |
Oops, something went wrong.