Skip to content

Commit

Permalink
added browser tests
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Nov 24, 2020
1 parent e1e058c commit ceb7cd5
Show file tree
Hide file tree
Showing 5 changed files with 397 additions and 8 deletions.
18 changes: 14 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ By providing any kind of contribution to this project, **you must agree and be l

## Contributions

Contributions by pull request or issues are welcome. Please ensure they follow the same style and architecture as the rest of the code. Use `npm run lint` before submitting. Please **do not include** any changes to the files in the `build` directory.
Contributions by pull request or issues are welcome. Please ensure they follow the same style and architecture as the rest of the code. Use `npm run lint` and see [Testing](#Testing) below before submitting. Please **do not include** any changes to the files in the `build` directory.

Before contributing please read the license agreement described at the beginning of this document.

Expand All @@ -22,6 +22,16 @@ which will install the required build dependencies, then run

which will run the development server and opens `http://localhost:8000/` in your browser. Any changes you make to the source will automatically rebuild and reload the page.

## Testing

All contributions should pass when running the commands

- `npm run lint`
- `npm run test`
- `npm run test-browser`

The output of `npm run test` also includes a [comparison report](https://github.com/liabru/matter-js/pull/794), which highlights changes in results, performance and accuracy against the last release build.

## Commands

The following development commands can be run at the terminal
Expand All @@ -33,8 +43,8 @@ creates a release build
- **npm run lint**
runs the linter
- **npm run test**
runs the tests
- **npm run compare**
compares the output of examples for current source against release build
runs the tests and compares results
- **npm run test-browser**
runs the browser tests
- **npm run doc**
builds the documentation
2 changes: 2 additions & 0 deletions demo/js/Demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@
examples: examples
});

window.MatterDemo = demo;

document.body.appendChild(demo.dom.root);

MatterTools.Demo.start(demo);
Expand Down
Loading

0 comments on commit ceb7cd5

Please sign in to comment.