New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

webrtc-troubleshoot

Package Overview
Dependencies
Maintainers
2
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webrtc-troubleshoot - npm Package Compare versions

Comparing version 10.2.1 to 11.0.0

dist/src/defaultTests.d.ts

58

package.json
{
"name": "webrtc-troubleshoot",
"version": "10.2.1",
"version": "11.0.0",
"description": "A way to add webrtc troubleshooting to your app",
"main": "src/index.js",
"types": "./dist/index.d.ts",
"files": [

@@ -12,11 +13,10 @@ "dist",

"license": "MIT",
"config": {
"report": "report --reporter=lcov --reporter=cobertura"
},
"scripts": {
"build": "webpack --env=prod --progress --profile --colors",
"unit-test": "nyc --reporter=lcov --reporter=cobertura ava test/unit/*.js",
"test": "semistandard && npm run unit-test && npm run report",
"report": "nyc report",
"start": "concurrently --kill-others \"webpack --env=prod --profile --colors --watch\" \"stupid-server ./\""
"start": "concurrently --kill-others \"webpack --env=prod --profile --colors --watch\" \"stupid-server ./\"",
"test": "npm run lint && npm run unit-test",
"test:watch": "jest --watch --collectCoverage=false",
"lint": "semistandard && npm run tslint",
"tslint": "tslint --project . --config tslint.json",
"unit-test": "jest"
},

@@ -28,12 +28,20 @@ "repository": "https://github.com/mypurecloud/webrtc-troubleshooter",

"devDependencies": {
"ava": "^0.25.0",
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-preset-env": "^1.6.1",
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"@types/jest": "^24.0.13",
"@types/node": "^12.0.2",
"@types/webrtc": "0.0.25",
"awesome-typescript-loader": "^5.2.1",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^24.8.0",
"babel-loader": "^7.1.5",
"browser-env": "^3.1.0",
"concurrently": "^4.1.0",
"nyc": "^13.0.0",
"jest": "^24.8.0",
"semistandard": "^12.0.1",
"sinon": "^2.3.8",
"stupid-server": "^0.2.5",
"ts-jest": "^24.0.2",
"tslint": "^5.17.0",
"tslint-config-semistandard": "^8.0.0",
"typescript": "^3.4.5",
"webpack": "^4.16.2",

@@ -50,27 +58,11 @@ "webpack-cli": "^3.1.0",

"presets": [
"env"
"@babel/preset-env"
]
},
"ava": {
"files": [
"!**/Ssim.js",
"!**/StatisticsAggregate.js",
"!**/VideoFrameChecker.js",
"!**/WebrtcCall.js"
],
"concurrency": 5,
"failFast": true,
"failWithoutAssertions": false,
"tap": true,
"powerAssert": false,
"require": [
"babel-register",
"./test/helpers/setup-browser-env.js"
]
},
"semistandard": {
"ignore": [
"**/dist"
"**/dist",
"**/_test"
]
}
}

@@ -6,26 +6,23 @@ # webrtc-troubleshooter

This provides diagnostic tests for basic WebRTC functionality. See the [test-page](./test-page/) directory for usage.
# Develop
# Getting Started
* `git clone` this repository
* `npm install`
* Serve with your favorite [stupid server](https://www.npmjs.com/package/stupid-server)
* `npm test`
* Run [unit-tests](#Testing) using `npm test`
* [Develop](#Develop) against the diagnostic tests using `npm start` and navigating to [http://localhost:8080/test-page](http://localhost:8080/test-page)
# Scripts
* Useful for running individual test files ~~`FILE=advanced-camera-test.js npm run unit-test-file` to run a single test file~~
* Personal favorite is with `watch` enabled: `npx ava --watch --fail-fast=false test/unit/video-bandwidth-test.js`
* Alternatively run `./node_modules/.bin/ava test/unit/advanced-camera-test.js` for an individual test
* `npm run coverage` runs the code coverage report
* `npm test` will run both lint and all the unit-test and report coverage in text form in command line
# Develop
To develop diagnostic tests this repo has a utility [./test-page/index.html](./test-page/index.html) that pulls in the tests and runs them in the browser. For WebRTC connections, most of the tests force the use of `relay` since the tests make peer connections to the same host.
* `npm start` will run webpack with the `--watch` flag and serve the test-page using stupid server.
* This is super helpful when you are writing new tests. You will still need to refrash the browser to pick up any new changes, but at least webpack will rebuild the app when you save a file :)
# Test Page
test-page/index.html
for console output of 6 tests to ensure webrtc is properly functioning
Here is a stringified version of google's STUN servers for quick reference:
Here is a stringified version of google's STUN servers for quick reference. Granted, you will still need an active TURN server for some of these tests to pass, but this will get the tests started.

@@ -35,1 +32,9 @@ ```

```
# Testing
The tests now use [Jest](https://jestjs.io/)!
> Test names must match the `*.spec.ts` or `*.spec.js` naming convention. This is configured in [jest.config.js](./jest.config.js)
* `npm test` will run both linting, all the unit-test, and report coverage in text form in the command line.
* `npm run test:watch` will run only the unit-tests and watch the files for changes (it also skips code coverage reporting).

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc