Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var _ = require('lodash'),
inherits = require('inherits'),
scopeLibraries = {
JSON: require('liquid-json'),
_: require('lodash3').noConflict(),
CryptoJS: require('crypto-js'),
atob: require('atob'),
btoa: require('btoa'),
tv4: require('tv4'),
xml2Json: require('./xml2Json'),
Backbone: require('backbone'),
cheerio: require('cheerio')
},
LEGACY_GLOBS = [
'tests', 'globals', 'environment', 'data', 'request', 'responseCookies', 'responseHeaders', 'responseTime',
'responseCode', 'responseBody', 'iteration', 'postman',
// scope libraries
'JSON', '_', 'CryptoJS', 'atob', 'btoa', 'tv4', 'xml2Json', 'Backbone', 'cheerio'
],
name: 'Session 3',
settings: {
threshold: 30000
}
})
var session4 = new Session({
name: 'Session 4'
})
var results = {
results: [session1, session2, session3, session4],
total: 4
}
var picker = lo3.partialRight(lo3.pick, ['id', 'settings'])
var r = lo3(results.results)
.filter('settings')
.map(picker)
.value()
expect(r).to.be.ok
expect(Array.isArray(r)).to.be.ok
expect(r.length).to.equal(3)
r.forEach(e => {
expect(e.id).to.be.ok
delete e.id
})
const expected = [