Socket
Socket
Sign inDemoInstall

@webex/test-helper-test-users

Package Overview
Dependencies
Maintainers
21
Versions
1211
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webex/test-helper-test-users - npm Package Compare versions

Comparing version 1.80.24 to 1.80.25

3

dist/index.js

@@ -46,2 +46,5 @@ 'use strict';

* @param {Object} options
* @param {number} options.count amount of users to create
* @param {Object} options.config configuration to pass to test-users library
* see test-users package for full options
* @private

@@ -48,0 +51,0 @@ * @returns {Promise<Array<User>>}

6

package.json
{
"name": "@webex/test-helper-test-users",
"version": "1.80.24",
"version": "1.80.25",
"description": "",

@@ -23,6 +23,6 @@ "license": "MIT",

"lodash": "^4.17.15",
"@webex/test-helper-retry": "1.80.24",
"@webex/test-users": "1.80.24",
"@webex/test-helper-retry": "1.80.25",
"@webex/test-users": "1.80.25",
"envify": "^4.1.0"
}
}

@@ -21,2 +21,57 @@ # @webex/test-helper-test-users

The `test-helper-test-users` package is a helper for [mocha](https://mochajs.org/) tests that handles the creation and deletion of test users in integration tests.
```javascript
import webex from 'webex';
import testUsers from '@webex/test-helper-test-users';
describe('My Amazing Integration Test Suite', () => {
let testUserA, testUserB, testUserC;
before('create users', () => {
// Create Three Test Users
return testUsers.create({count: 3})
})
.then((createdTestUsers) => {
// Save the created test users
[testUserA, testUserB, testUserC] = createdTestUsers;
// Create a new sdk instance for the test user
testUserA.webex = webex.init({
config: {
credentials: {
authorization: testUserA.token
}
}
});
it('can do things with a test user', () => {
testUserA.people.get('me')
});
```
### Environment Defaults
The test users package defaults to certain environment variables if the values aren't specified in the "create" command. Those variables are:
- `WEBEX_CLIENT_ID` - The Webex client ID that has access to create test users
- `WEBEX_CLIENT_SECRET` - The Webex client secret for the given client id
- `WEBEX_TEST_USERS_CONVERSATION_SERVICE_URL` - The Webex url for conversation service to create test users
- `WEBEX_SCOPE` - The Webex scope the test users should be created with
- `IDBROKER_BASE_URL` - The Webex auth endpoint to get a client based access token
These variables can been passed in to the `create` command as a `config` object as well:
```javascript
const createConfig = {
clientId: mySpecificValue,
clientSecret: mySpecificValue,
idbrokerUrl: mySpecificValue,
conversationServiceUrl: mySpecificValue,
scope: mySpecificValue
};
testUsers.create({config: createConfig});
```
## Maintainers

@@ -23,0 +78,0 @@

@@ -29,2 +29,5 @@ /*!

* @param {Object} options
* @param {number} options.count amount of users to create
* @param {Object} options.config configuration to pass to test-users library
* see test-users package for full options
* @private

@@ -31,0 +34,0 @@ * @returns {Promise<Array<User>>}

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