elemental-live-client
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "elemental-live-client", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "JS library to communicate with Elemental live API", | ||
@@ -5,0 +5,0 @@ "directories": { |
@@ -9,4 +9,6 @@ { | ||
"max-statements": "off", | ||
"no-console": "off" | ||
"no-console": "off", | ||
"no-plusplus": "off", | ||
"id-length": "off" | ||
} | ||
} |
@@ -8,2 +8,13 @@ import ElementalClient from '../lib/elemental-client'; | ||
const randomString = (length) => { | ||
const values = 'ABCDEFGHIJKLMNOPQRTUVWHXYZabcdefghijklmnopqrtuvwhxyz0123456789'; | ||
let result = ''; | ||
for (let i = 0; i < length; i++) { | ||
result += values.charAt(Math.floor(Math.random() * values.length)); | ||
} | ||
return result; | ||
}; | ||
afterEach(() => { | ||
@@ -25,3 +36,3 @@ const promises = eventsToClean.map((el) => | ||
test('create, get, start, stop and reset a live event using file input', () => { | ||
const rand = Math.random(); | ||
const rand = randomString(10); | ||
const fileInput = process.env.ELEMENTAL_CLIENT_INTEGRATION_TESTS_FILE_INPUT | ||
@@ -148,3 +159,3 @@ ? process.env.ELEMENTAL_CLIENT_INTEGRATION_TESTS_FILE_INPUT | ||
schedule: { | ||
name: `scheduled-event-${Math.random()}`, | ||
name: `tests-scheduled-event-${randomString(6)}`, | ||
input: { | ||
@@ -155,3 +166,3 @@ 'file_input': { | ||
}, | ||
'start_time': ElementalClient.formatDate(new Date(now.getTime() + interval)), | ||
'start_time': ElementalClient.formatDate(new Date(now.setSeconds(0, 0) + interval)), | ||
'end_type': 'duration', | ||
@@ -158,0 +169,0 @@ 'duration': 120, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123234
804