2016-06-28 02:30:12 +03:00
|
|
|
# Contributing
|
|
|
|
|
|
|
|
## Setup
|
|
|
|
|
|
|
|
Clone the repository:
|
|
|
|
```
|
|
|
|
git clone https://github.com/Microsoft/powerbi-models
|
|
|
|
```
|
|
|
|
|
2016-08-05 23:23:45 +03:00
|
|
|
Navigate to the cloned directory
|
2016-06-28 02:30:12 +03:00
|
|
|
|
|
|
|
Install local dependencies:
|
|
|
|
```
|
2016-07-13 19:54:20 +03:00
|
|
|
npm install
|
2016-06-28 02:30:12 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
## Building
|
|
|
|
```
|
2016-08-05 23:23:45 +03:00
|
|
|
npm run build
|
2016-06-28 02:30:12 +03:00
|
|
|
```
|
|
|
|
Or if using VS Code: `Ctrl + Shift + B`
|
|
|
|
|
|
|
|
## Testing
|
|
|
|
```
|
|
|
|
npm test
|
|
|
|
```
|
|
|
|
|
2016-08-05 23:23:45 +03:00
|
|
|
By default the tests run using PhantomJS
|
2016-06-28 02:30:12 +03:00
|
|
|
|
|
|
|
There are various command line arguments that can be passed to the test command to facilitate debugging:
|
|
|
|
|
|
|
|
Run tests with Chrome
|
|
|
|
```
|
2016-08-05 23:23:45 +03:00
|
|
|
npm test -- --chrome
|
2016-06-28 02:30:12 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
Enable debug level logging for karma, and remove code coverage
|
|
|
|
```
|
2016-08-05 23:23:45 +03:00
|
|
|
npm test -- --debug
|
2016-06-28 02:30:12 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
Disable single run to remain open for debugging
|
|
|
|
```
|
2016-08-05 23:23:45 +03:00
|
|
|
npm test -- --watch
|
2016-06-28 02:30:12 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
These are often combined and typical command for debugging tests is:
|
|
|
|
```
|
2016-08-05 23:23:45 +03:00
|
|
|
npm test -- --chrome --debug --watch
|
2016-06-28 02:30:12 +03:00
|
|
|
```
|