How to use stats method in locust

Best Python code snippet using locust

filter_functions.js

Source:filter_functions.js Github

copy

Full Screen

1import _ from 'lodash'2function totalGoals(item) {3 let totalGoals;4 if (item.view.scores) {5 totalGoals = parseInt(item.view.scores['2'].home) + parseInt(item.view.scores['2'].away);6 return totalGoals <= 07 } else {8 return false9 }10}11function goalsDraw(item) {12 return parseInt(item.view.scores['2'].home) === parseInt(item.view.scores['2'].away);13}14function startTB(item) {15 if (item.odds['1_3']) {16 let totalOdds = item.odds['1_3'];17 let startTotalOdd = totalOdds[totalOdds.length - 1];18 //let handicaps_1_8 = ['2.5, 3.0', '3.0, 3,5'];19 //let handicaps_1_9 = ['3.5', '3.5, 4.0', '4.0, 4.5', '4.5', '4.5, 5.0', '5.0, 5.5', '5,5', '5.5, 6.0', '6.0, 6.5', '6.5', '6.5, 7.0', '7.0, 7.5', '7.5', '7.5, 8.0', '8.0, 8.5', '8.5'];20 if (startTotalOdd) {21 //let overOd = parseFloat(startTotalOdd.over_od);22 //let handicap = (startTotalOdd.handicap + '').trim();23 let handicapArray = startTotalOdd.handicap.split(',');24 return parseFloat(startTotalOdd.over_od) <= 1.75 && parseFloat(handicapArray[0]) <= 2.525 || parseFloat(startTotalOdd.over_od) < 1.95 && parseFloat(handicapArray[0]) > 326 || parseFloat(startTotalOdd.over_od) < 1.85 && parseInt(handicapArray[0]) === 327 } else {28 return false29 }30 }31}32function startResultOdd(item) {33 if (item.odds['1_1'] && item.scores ) {34 let resultOdds = item.odds['1_1'];35 let startResultOdd = resultOdds[resultOdds.length - 1];36 if (startResultOdd) {37 if (parseFloat(startResultOdd.home_od) <= 1.4 || parseFloat(startResultOdd.away_od) <= 1.4) {38 return true39 } else {40 return false41 }42 } else {43 return false44 }45 }46}47function leagueName(item) {48 if (item.league && item.league.name) {49 let leagueNameFilter = ['50', '60', '70', '80', 'Women', 'U18', 'U19', 'U20'];50 return item.league.name.indexOf(leagueNameFilter[0]) === -151 && item.league.name.indexOf(leagueNameFilter[1]) === -152 && item.league.name.indexOf(leagueNameFilter[2]) === -153 && item.league.name.indexOf(leagueNameFilter[3]) === -154 && item.league.name.indexOf(leagueNameFilter[4]) === -155 && item.league.name.indexOf(leagueNameFilter[5]) === -156 && item.league.name.indexOf(leagueNameFilter[6]) === -157 && item.league.name.indexOf(leagueNameFilter[7]) === -158 }59}60function attacksBot3(item) {61 if (item.view && item.view.stats && item.view.stats.on_target && item.view.stats.attacks && item.view.stats.dangerous_attacks) {62 let goalsOnTarget = 0;63 goalsOnTarget = parseInt(item.view.stats.on_target[0]) + parseInt(item.view.stats.on_target[1]);64 let attacksSumm = 0;65 attacksSumm = parseInt(item.view.stats.attacks[0]) + parseInt(item.view.stats.attacks[1]);66 let dangerAttacksSumm = 0;67 dangerAttacksSumm = parseInt(item.view.stats.dangerous_attacks[0]) + parseInt(item.view.stats.dangerous_attacks[1]);68 return goalsOnTarget >= 3 && attacksSumm >= 38 && dangerAttacksSumm/attacksSumm >= 0.569 } else {70 return false71 }72}73function attacksBot2(item) {74 if (item.view && item.view.stats && item.view.stats.on_target && item.view.stats.off_target && item.view.stats.attacks && item.view.stats.dangerous_attacks) {75 let goalsOnTarget = 0;76 goalsOnTarget = parseInt(item.view.stats.on_target[0]) + parseInt(item.view.stats.on_target[1]);77 let attacksSumm = 0;78 attacksSumm = parseInt(item.view.stats.attacks[0]) + parseInt(item.view.stats.attacks[1]);79 let dangerAttacksSumm = 0;80 dangerAttacksSumm = parseInt(item.view.stats.dangerous_attacks[0]) + parseInt(item.view.stats.dangerous_attacks[1]);81 let allGoals = 0;82 allGoals = goalsOnTarget + parseInt(item.view.stats.off_target[0]) + parseInt(item.view.stats.off_target[1]);83 let dangerAttacksDiff = Math.abs(parseInt(item.view.stats.dangerous_attacks[0]) - parseInt(item.view.stats.dangerous_attacks[1]));84 let dangerAttacksKef;85 if (parseInt(item.view.stats.dangerous_attacks[0]) >= parseInt(item.view.stats.dangerous_attacks[1])) {86 dangerAttacksKef = parseInt(item.view.stats.attacks[0])/parseInt(item.view.stats.dangerous_attacks[0])87 } else {88 dangerAttacksKef = parseInt(item.view.stats.attacks[1])/parseInt(item.view.stats.dangerous_attacks[1])89 }90 let favoriteDangerAttacksKef;91 if (parseInt(item.view.stats.dangerous_attacks[0]) > parseInt(item.view.stats.dangerous_attacks[1])) {92 favoriteDangerAttacksKef = parseInt(item.view.stats.dangerous_attacks[0])/parseInt(item.view.stats.dangerous_attacks[1]);93 } else {94 favoriteDangerAttacksKef = parseInt(item.view.stats.dangerous_attacks[1])/parseInt(item.view.stats.dangerous_attacks[0]);95 }96 return goalsOnTarget >= 1 && allGoals >= 4 && (item.view.stats.dangerous_attacks[0] <= 10 || item.view.stats.dangerous_attacks[1] <= 10)97 && favoriteDangerAttacksKef >= 2.298 } else {99 return false100 }101}102function attacksBot1(item) {103 if (item.view && item.view.stats && item.view.stats.on_target && item.view.stats.attacks && item.view.stats.dangerous_attacks) {104 let goalsOnTarget = 0;105 goalsOnTarget = parseInt(item.view.stats.on_target[0]) + parseInt(item.view.stats.on_target[1]);106 let attacksSumm = 0;107 attacksSumm = parseInt(item.view.stats.attacks[0]) + parseInt(item.view.stats.attacks[1]);108 let dangerAttacksSumm = 0;109 dangerAttacksSumm = parseInt(item.view.stats.dangerous_attacks[0]) + parseInt(item.view.stats.dangerous_attacks[1]);110 let dangerAttacksDif = Math.abs(parseInt(item.view.stats.dangerous_attacks[0]) - parseInt(item.view.stats.dangerous_attacks[1]));111 let dangerAttacksKef;112 if (parseInt(item.view.stats.dangerous_attacks[0]) > parseInt(item.view.stats.dangerous_attacks[1])) {113 dangerAttacksKef = parseInt(item.view.stats.dangerous_attacks[0])/parseInt(item.view.stats.dangerous_attacks[1]);114 } else {115 dangerAttacksKef = parseInt(item.view.stats.dangerous_attacks[1])/parseInt(item.view.stats.dangerous_attacks[0]);116 }117 return dangerAttacksDif >= 10 && goalsOnTarget >= 3118 } else {119 return false120 }121}122function attacksBotTM(item) {123 if (item.view && item.view.stats && item.view.stats.on_target && item.view.stats.attacks && item.view.stats.dangerous_attacks) {124 let goalsOnTarget = 0;125 goalsOnTarget = parseInt(item.view.stats.on_target[0]) + parseInt(item.view.stats.on_target[1]);126 let goalsOffTarget = 0;127 goalsOffTarget = parseInt(item.view.stats.off_target[0]) + parseInt(item.view.stats.off_target[1]);128 let attacksSumm = 0;129 attacksSumm = parseInt(item.view.stats.attacks[0]) + parseInt(item.view.stats.attacks[1]);130 let dangerAttacksSumm = 0;131 dangerAttacksSumm = parseInt(item.view.stats.dangerous_attacks[0]) + parseInt(item.view.stats.dangerous_attacks[1]);132 let dangerAttacksDif = Math.abs(parseInt(item.view.stats.dangerous_attacks[0]) - parseInt(item.view.stats.dangerous_attacks[1]));133 let dangerAttacksKef;134 if (parseInt(item.view.stats.dangerous_attacks[0]) > parseInt(item.view.stats.dangerous_attacks[1])) {135 dangerAttacksKef = parseInt(item.view.stats.dangerous_attacks[0])/parseInt(item.view.stats.dangerous_attacks[1]);136 } else {137 dangerAttacksKef = parseInt(item.view.stats.dangerous_attacks[1])/parseInt(item.view.stats.dangerous_attacks[0]);138 }139 return dangerAttacksKef >= 2.3140 } else {141 return false142 }143}144function attacksBotCorporation(item) {145 if (item.view && item.view.stats && item.view.stats.on_target && item.view.stats.attacks && item.view.stats.dangerous_attacks) {146 let goalsOnTarget = 0;147 goalsOnTarget = parseInt(item.view.stats.on_target[0]) + parseInt(item.view.stats.on_target[1]);148 let goalsOnTargetDiff = 0;149 goalsOnTargetDiff = Math.abs(parseInt(item.view.stats.on_target[0]) - parseInt(item.view.stats.on_target[1]));150 let goalsOffTarget = 0;151 goalsOffTarget = parseInt(item.view.stats.off_target[0]) + parseInt(item.view.stats.off_target[1]);152 let attacksSumm = 0;153 attacksSumm = parseInt(item.view.stats.attacks[0]) + parseInt(item.view.stats.attacks[1]);154 let dangerAttacksSumm = 0;155 dangerAttacksSumm = parseInt(item.view.stats.dangerous_attacks[0]) + parseInt(item.view.stats.dangerous_attacks[1]);156 let dangerAttacksDif = Math.abs(parseInt(item.view.stats.dangerous_attacks[0]) - parseInt(item.view.stats.dangerous_attacks[1]));157 let dangerAttacksKef;158 if (parseInt(item.view.stats.dangerous_attacks[0]) > parseInt(item.view.stats.dangerous_attacks[1])) {159 dangerAttacksKef = parseInt(item.view.stats.dangerous_attacks[0])/parseInt(item.view.stats.dangerous_attacks[1]);160 } else {161 dangerAttacksKef = parseInt(item.view.stats.dangerous_attacks[1])/parseInt(item.view.stats.dangerous_attacks[0]);162 }163 return goalsOnTarget >= 3 && goalsOnTargetDiff >= 2 && (goalsOffTarget + goalsOnTarget) >= 5 && dangerAttacksDif >= 9;164 } else {165 return false166 }167}168function attacks(item) {169 //return item.view && item.view.stats && item.view.stats.on_target && item.view.stats.attacks && item.view.stats.dangerous_attacks170 if (item.view && item.view.stats && item.view.stats.on_target && item.view.stats.attacks && item.view.stats.dangerous_attacks && item.odds['1_1'] && parseFloat(item.odds['1_1'][0].home_od) > 1) {171 /*let goalsOnTarget = 0;172 goalsOnTarget = parseInt(item.view.stats.on_target[0]) + parseInt(item.view.stats.on_target[1]);173 let goalsOffTarget = 0;174 goalsOffTarget = parseInt(item.view.stats.off_target[0]) + parseInt(item.view.stats.off_target[1]);175 let team1AllGoals = 0;176 team1AllGoals = parseInt(item.view.stats.on_target[0]) + parseInt(item.view.stats.off_target[0]);177 let team2AllGoals = 0;178 team2AllGoals = parseInt(item.view.stats.on_target[1]) + parseInt(item.view.stats.off_target[1]);179 let attacksSumm = 0;180 attacksSumm = parseInt(item.view.stats.attacks[0]) + parseInt(item.view.stats.attacks[1]);181 let dangerAttacksSumm = 0182 dangerAttacksSumm = parseInt(item.view.stats.dangerous_attacks[0]) + parseInt(item.view.stats.dangerous_attacks[1]);183 let dangerAttacksDif = Math.abs(parseInt(item.view.stats.dangerous_attacks[0]) - parseInt(item.view.stats.dangerous_attacks[1]));184 let attacksKef = attacksSumm/dangerAttacksSumm;*/185 let dangerAttacksSumm = 0;186 dangerAttacksSumm = parseInt(item.view.stats.dangerous_attacks[0]) + parseInt(item.view.stats.dangerous_attacks[1]);187 let dangerAttacksKef;188 let advantageTeam = '';189 let dangerAttacksDiff = Math.abs(parseInt(item.view.stats.dangerous_attacks[0]) - parseInt(item.view.stats.dangerous_attacks[1]));190 let attacksDiff;191 if (parseInt(item.view.stats.dangerous_attacks[0]) > parseInt(item.view.stats.dangerous_attacks[1])) {192 dangerAttacksKef = parseInt(item.view.stats.dangerous_attacks[0])/parseInt(item.view.stats.dangerous_attacks[1]);193 attacksDiff = parseInt(item.view.stats.attacks[0]) - parseInt(item.view.stats.attacks[1]);194 advantageTeam = 'home'195 } else {196 dangerAttacksKef = parseInt(item.view.stats.dangerous_attacks[1])/parseInt(item.view.stats.dangerous_attacks[0]);197 attacksDiff = parseInt(item.view.stats.attacks[1]) - parseInt(item.view.stats.attacks[0]);198 advantageTeam = 'away'199 }200 let resultOdds = item.odds['1_1'];201 let startResultOdd = resultOdds[resultOdds.length - 1];202 let oddsKef = parseFloat(startResultOdd.home_od)/parseFloat(startResultOdd.away_od);203 let attacksRatioKefHome;204 let attacksRatioKefAway;205 if (parseInt(item.view.stats.attacks[0]) > parseInt(item.view.stats.attacks[1])) {206 attacksRatioKefHome = parseInt(item.view.stats.attacks[0])/parseInt(item.view.stats.attacks[1]);207 } else {208 attacksRatioKefAway = parseInt(item.view.stats.attacks[1])/parseInt(item.view.stats.attacks[0]);209 }210 //Супер бот211 return ((dangerAttacksKef >= 3.2 && advantageTeam === 'home' || dangerAttacksKef >= 1.2 && dangerAttacksKef <= 1.5 && advantageTeam === 'away') && dangerAttacksDiff >= 3 && oddsKef >= 0.5 && oddsKef <= 1.2)212 //тедди213 //return (advantageTeam === 'away' && dangerAttacksDiff >= 3 && attacksRatioKefAway >= 1.2 && oddsKef >= 0.3 && oddsKef <= 1.2 && dangerAttacksSumm >= 18)214 } else {215 return false216 }217}218function trendAttacks(item) {219 //return item.view && item.view.stats && item.view.stats.on_target && item.view.stats.attacks && item.view.stats.dangerous_attacks220 if (item.trends && item.trends.dangerous_attacks) {221 let homeDangerAttacks;222 let awayDangerAttacks;223 let home45 = _.find(item.trends.dangerous_attacks.home, function(item) {224 return item.time_str === '65'225 })226 let home64 = _.find(item.trends.dangerous_attacks.home, function(item) {227 return item.time_str === '79'228 })229 let away45 = _.find(item.trends.dangerous_attacks.away, function(item) {230 return item.time_str === '65'231 })232 let away64 = _.find(item.trends.dangerous_attacks.away, function(item) {233 return item.time_str === '79'234 })235 if (home45 && home64 && away45 && away64) {236 homeDangerAttacks = home64.val - home45.val;237 awayDangerAttacks = away64.val - away45.val;238 let dangerAttacksKef;239 if (homeDangerAttacks > awayDangerAttacks) {240 dangerAttacksKef = homeDangerAttacks/awayDangerAttacks241 } else {242 dangerAttacksKef = awayDangerAttacks/homeDangerAttacks243 }244 return (dangerAttacksKef >= 1.5)245 } else {246 return false247 }248 } else {249 return false250 }251}252function mapTrendAttacks(item) {253 //return item.view && item.view.stats && item.view.stats.on_target && item.view.stats.attacks && item.view.stats.dangerous_attacks254 if (item.trends && item.trends.dangerous_attacks) {255 let homeDangerAttacks;256 let awayDangerAttacks;257 let home45 = _.find(item.trends.dangerous_attacks.home, function(item) {258 return item.time_str === '65'259 })260 let home64 = _.find(item.trends.dangerous_attacks.home, function(item) {261 return item.time_str === '79'262 })263 let away45 = _.find(item.trends.dangerous_attacks.away, function(item) {264 return item.time_str === '65'265 })266 let away64 = _.find(item.trends.dangerous_attacks.away, function(item) {267 return item.time_str === '79'268 })269 if (home45 && home64 && away45 && away64) {270 homeDangerAttacks = home64.val - home45.val;271 awayDangerAttacks = away64.val - away45.val;272 item.homeDangerAttacks = homeDangerAttacks;273 item.awayDangerAttacks = awayDangerAttacks;274 return item275 } else {276 return false277 }278 } else {279 return false280 }281}282function currentWinner(item) {283 if (item.odds['1_1'] && parseFloat(item.odds['1_1'][0].home_od) > 1) {284 let winnerOdds = item.odds['1_1'];285 let currentWinnerOdd = winnerOdds[0];286 let dangerAttacksKef = parseInt(item.view.stats.dangerous_attacks[0])/parseInt(item.view.stats.dangerous_attacks[1]);287 if (dangerAttacksKef > 1) {288 if (parseFloat(currentWinnerOdd.home_od) >= 1.8 && parseFloat(currentWinnerOdd.home_od) <= 5) {289 return true290 } else {291 return false292 }293 } else {294 if (parseFloat(currentWinnerOdd.away_od) >= 1.8 && parseFloat(currentWinnerOdd.away_od) <= 5 ) {295 return true296 } else {297 return false298 }299 }300 /*if (parseInt(item.view.stats.dangerous_attacks[0]) > parseInt(item.view.stats.dangerous_attacks[1])) {301 if (parseFloat(currentWinnerOdd.home_od) >= 1.8 && parseFloat(currentWinnerOdd.home_od) <= 2.8) {302 return true303 } else {304 return false305 }306 } else {307 if (parseFloat(currentWinnerOdd.away_od) >= 1.8 && parseFloat(currentWinnerOdd.away_od) <= 2.8) {308 return true309 } else {310 return false311 }312 }*/313 }314}315function halfTimeWinnerOdds(item) {316 //return true317 if (item.odds['1_8'] && item.odds['1_8'][0] && parseFloat(item.odds['1_8'][0].draw_od) > 1) {318 //return true319 let winnerOdds = item.odds['1_8'];320 let currentWinnerOdd = winnerOdds[0];321 if (parseFloat(currentWinnerOdd.draw_od) >= 1.75) {322 return true323 } else {324 return false325 }326 /*if (parseInt(item.view.stats.dangerous_attacks[0]) > parseInt(item.view.stats.dangerous_attacks[1])) {327 if (parseFloat(currentWinnerOdd.home_od) >= 1.8 && parseFloat(currentWinnerOdd.home_od) <= 2.8) {328 return true329 } else {330 return false331 }332 } else {333 if (parseFloat(currentWinnerOdd.away_od) >= 1.8 && parseFloat(currentWinnerOdd.away_od) <= 2.8) {334 return true335 } else {336 return false337 }338 }*/339 }340}341function favoriteLoses(item) {342 if (item.view.scores && item.view.scores['2'] && item.odds['1_1'] && parseFloat(item.odds['1_1'][0].home_od) > 1) {343 if (parseFloat(item.odds['1_1'][0].home_od) < 2 && item.view.scores['2'].home < item.view.scores['2'].away) {344 return true345 } else if (parseFloat(item.odds['1_1'][0].away_od) < 2 && item.view.scores['2'].home > item.view.scores['2'].away) {346 return true347 }348 } else {349 return false350 }351}352function currentTB1stHalf(item) {353 if (item.odds && item.odds['1_6'] && item.odds['1_6']['0']) {354 if (item.odds['1_6']['0'].over_od <= 1.95) {355 return true;356 } else {357 return false358 }359 } else {360 return false361 }362}363export const filterFunctions = {364 startTB: startTB,365 leagueName: leagueName,366 attacksBot1: attacksBot1,367 attacksBot2: attacksBot2,368 attacksBot3: attacksBot3,369 attacksBotCorporation: attacksBotCorporation,370 totalGoals: totalGoals,371 attacks: attacks,372 currentWinner: currentWinner,373 startResultOdd: startResultOdd,374 halfTimeWinnerOdds: halfTimeWinnerOdds,375 favoriteLoses: favoriteLoses,376 currentTB1stHalf: currentTB1stHalf,377 goalsDraw: goalsDraw,378 trendAttacks: trendAttacks,379 mapTrendAttacks: mapTrendAttacks,380 attacksBotTM: attacksBotTM...

Full Screen

Full Screen

stats.js

Source:stats.js Github

copy

Full Screen

1/*2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.3 *4 * Use of this source code is governed by a BSD-style license5 * that can be found in the LICENSE file in the root of the source6 * tree.7 */8/* More information about these options at jshint.com/docs/options */9/* exported computeBitrate, computeE2EDelay, computeRate,10 enumerateStats, extractStatAsInt, refreshStats */11'use strict';12// Return the integer stat |statName| from the object with type |statObj| in13// |stats|, or null if not present.14function extractStatAsInt(stats, statObj, statName) {15 // Ignore stats that have a 'nullish' value.16 // The correct fix is indicated in17 // https://code.google.com/p/webrtc/issues/detail?id=3377.18 var str = extractStat(stats, statObj, statName);19 if (str) {20 var val = parseInt(str);21 if (val !== -1) {22 return val;23 }24 }25 return null;26}27// Return the stat |statName| from the object with type |statObj| in |stats|28// as a string, or null if not present.29function extractStat(stats, statObj, statName) {30 var report = getStatsReport(stats, statObj, statName);31 if (report && report[statName] !== -1) {32 return report[statName];33 }34 return null;35}36// Return the stats report with type |statObj| in |stats|, with the stat37// |statName| (if specified), and value |statVal| (if specified). Return38// undef if not present.39function getStatsReport(stats, statObj, statName, statVal) {40 var result = null;41 if (stats) {42 stats.forEach(function(report, stat) {43 if (report.type === statObj) {44 var found = true;45 // If |statName| is present, ensure |report| has that stat.46 // If |statVal| is present, ensure the value matches.47 if (statName) {48 var val = statName === 'id' ? report.id : report[statName];49 found = (statVal !== undefined) ? (val === statVal) : val;50 }51 if (found) {52 result = report;53 }54 }55 });56 }57 return result;58}59// Enumerates the new standard compliant stats using local and remote track ids.60function enumerateStats(stats, localTrackIds, remoteTrackIds) {61 // Create an object structure with all the needed stats and types that we care62 // about. This allows to map the getStats stats to other stats names.63 var statsObject = {64 audio: {65 local: {66 audioLevel: 0.0,67 bytesSent: 0,68 clockRate: 0,69 codecId: '',70 mimeType: '',71 packetsSent: 0,72 payloadType: 0,73 timestamp: 0.0,74 trackId: '',75 transportId: '',76 },77 remote: {78 audioLevel: 0.0,79 bytesReceived: 0,80 clockRate: 0,81 codecId: '',82 fractionLost: 0,83 jitter: 0,84 mimeType: '',85 packetsLost: 0,86 packetsReceived: 0,87 payloadType: 0,88 timestamp: 0.0,89 trackId: '',90 transportId: '',91 }92 },93 video: {94 local: {95 bytesSent: 0,96 clockRate: 0,97 codecId: '',98 firCount: 0,99 framesEncoded: 0,100 frameHeight: 0,101 framesSent: 0,102 frameWidth: 0,103 nackCount: 0,104 packetsSent: 0,105 payloadType: 0,106 pliCount: 0,107 qpSum: 0,108 timestamp: 0.0,109 trackId: '',110 transportId: '',111 },112 remote: {113 bytesReceived: 0,114 clockRate: 0,115 codecId: '',116 firCount: 0,117 fractionLost: 0,118 frameHeight: 0,119 framesDecoded: 0,120 framesDropped: 0,121 framesReceived: 0,122 frameWidth: 0,123 nackCount: 0,124 packetsLost: 0,125 packetsReceived: 0,126 payloadType: 0,127 pliCount: 0,128 qpSum: 0,129 timestamp: 0.0,130 trackId: '',131 transportId: '',132 }133 },134 connection: {135 availableOutgoingBitrate: 0,136 bytesReceived: 0,137 bytesSent: 0,138 consentRequestsSent: 0,139 currentRoundTripTime: 0.0,140 localCandidateId: '',141 localCandidateType: '',142 localIp: '',143 localPort: 0,144 localPriority: 0,145 localProtocol: '',146 remoteCandidateId: '',147 remoteCandidateType: '',148 remoteIp: '',149 remotePort: 0,150 remotePriority: 0,151 remoteProtocol: '',152 requestsReceived: 0,153 requestsSent: 0,154 responsesReceived: 0,155 responsesSent: 0,156 timestamp: 0.0,157 totalRoundTripTime: 0.0,158 }159 };160 // Need to find the codec, local and remote ID's first.161 if (stats) {162 stats.forEach(function(report, stat) {163 switch(report.type) {164 case 'outbound-rtp':165 if (report.hasOwnProperty('trackId')) {166 if (report.trackId.indexOf(localTrackIds.audio) !== -1) {167 statsObject.audio.local.bytesSent = report.bytesSent;168 statsObject.audio.local.codecId = report.codecId;169 statsObject.audio.local.packetsSent = report.packetsSent;170 statsObject.audio.local.timestamp = report.timestamp;171 statsObject.audio.local.trackId = report.trackId;172 statsObject.audio.local.transportId = report.transportId;173 }174 if (report.trackId.indexOf(localTrackIds.video) !== -1) {175 statsObject.video.local.bytesSent = report.bytesSent;176 statsObject.video.local.codecId = report.codecId;177 statsObject.video.local.firCount = report.firCount;178 statsObject.video.local.framesEncoded = report.frameEncoded;179 statsObject.video.local.framesSent = report.framesSent;180 statsObject.video.local.packetsSent = report.packetsSent;181 statsObject.video.local.pliCount = report.pliCount;182 statsObject.video.local.qpSum = report.qpSum;183 statsObject.video.local.timestamp = report.timestamp;184 statsObject.video.local.trackId = report.trackId;185 statsObject.video.local.transportId = report.transportId;186 }187 }188 break;189 case 'inbound-rtp':190 if (report.hasOwnProperty('trackId')) {191 if(report.trackId.indexOf(remoteTrackIds.audio) !== -1) {192 statsObject.audio.remote.bytesReceived = report.bytesReceived;193 statsObject.audio.remote.codecId = report.codecId;194 statsObject.audio.remote.fractionLost = report.fractionLost;195 statsObject.audio.remote.jitter = report.jitter;196 statsObject.audio.remote.packetsLost = report.packetsLost;197 statsObject.audio.remote.packetsReceived = report.packetsReceived;198 statsObject.audio.remote.timestamp = report.timestamp;199 statsObject.audio.remote.trackId = report.trackId;200 statsObject.audio.remote.transportId = report.transportId;201 }202 if (report.trackId.indexOf(remoteTrackIds.video) !== -1) {203 statsObject.video.remote.bytesReceived = report.bytesReceived;204 statsObject.video.remote.codecId = report.codecId;205 statsObject.video.remote.firCount = report.firCount;206 statsObject.video.remote.fractionLost = report.fractionLost;207 statsObject.video.remote.nackCount = report.nackCount;208 statsObject.video.remote.packetsLost = report.patsLost;209 statsObject.video.remote.packetsReceived = report.packetsReceived;210 statsObject.video.remote.pliCount = report.pliCount;211 statsObject.video.remote.qpSum = report.qpSum;212 statsObject.video.remote.timestamp = report.timestamp;213 statsObject.video.remote.trackId = report.trackId;214 statsObject.video.remote.transportId = report.transportId;215 }216 }217 break;218 case 'candidate-pair':219 if (report.hasOwnProperty('availableOutgoingBitrate')) {220 statsObject.connection.availableOutgoingBitrate =221 report.availableOutgoingBitrate;222 statsObject.connection.bytesReceived = report.bytesReceived;223 statsObject.connection.bytesSent = report.bytesSent;224 statsObject.connection.consentRequestsSent =225 report.consentRequestsSent;226 statsObject.connection.currentRoundTripTime =227 report.currentRoundTripTime;228 statsObject.connection.localCandidateId = report.localCandidateId;229 statsObject.connection.remoteCandidateId = report.remoteCandidateId;230 statsObject.connection.requestsReceived = report.requestsReceived;231 statsObject.connection.requestsSent = report.requestsSent;232 statsObject.connection.responsesReceived = report.responsesReceived;233 statsObject.connection.responsesSent = report.responsesSent;234 statsObject.connection.timestamp = report.timestamp;235 statsObject.connection.totalRoundTripTime =236 report.totalRoundTripTime;237 }238 break;239 default:240 return;241 }242 }.bind());243 // Using the codec, local and remote candidate ID's to find the rest of the244 // relevant stats.245 stats.forEach(function(report) {246 switch(report.type) {247 case 'track':248 if (report.hasOwnProperty('trackIdentifier')) {249 if (report.trackIdentifier.indexOf(localTrackIds.video) !== -1) {250 statsObject.video.local.frameHeight = report.frameHeight;251 statsObject.video.local.framesSent = report.framesSent;252 statsObject.video.local.frameWidth = report.frameWidth;253 }254 if (report.trackIdentifier.indexOf(remoteTrackIds.video) !== -1) {255 statsObject.video.remote.frameHeight = report.frameHeight;256 statsObject.video.remote.framesDecoded = report.framesDecoded;257 statsObject.video.remote.framesDropped = report.framesDropped;258 statsObject.video.remote.framesReceived = report.framesReceived;259 statsObject.video.remote.frameWidth = report.frameWidth;260 }261 if (report.trackIdentifier.indexOf(localTrackIds.audio) !== -1) {262 statsObject.audio.local.audioLevel = report.audioLevel ;263 }264 if (report.trackIdentifier.indexOf(remoteTrackIds.audio) !== -1) {265 statsObject.audio.remote.audioLevel = report.audioLevel;266 }267 }268 break;269 case 'codec':270 if (report.hasOwnProperty('id')) {271 if (report.id.indexOf(statsObject.audio.local.codecId) !== -1) {272 statsObject.audio.local.clockRate = report.clockRate;273 statsObject.audio.local.mimeType = report.mimeType;274 statsObject.audio.local.payloadType = report.payloadType;275 }276 if (report.id.indexOf(statsObject.audio.remote.codecId) !== -1) {277 statsObject.audio.remote.clockRate = report.clockRate;278 statsObject.audio.remote.mimeType = report.mimeType;279 statsObject.audio.remote.payloadType = report.payloadType;280 }281 if (report.id.indexOf(statsObject.video.local.codecId) !== -1) {282 statsObject.video.local.clockRate = report.clockRate;283 statsObject.video.local.mimeType = report.mimeType;284 statsObject.video.local.payloadType = report.payloadType;285 }286 if (report.id.indexOf(statsObject.video.remote.codecId) !== -1) {287 statsObject.video.remote.clockRate = report.clockRate;288 statsObject.video.remote.mimeType = report.mimeType;289 statsObject.video.remote.payloadType = report.payloadType;290 }291 }292 break;293 case 'local-candidate':294 if (report.hasOwnProperty('id')) {295 if (report.id.indexOf(296 statsObject.connection.localCandidateId) !== -1) {297 statsObject.connection.localIp = report.ip;298 statsObject.connection.localPort = report.port;299 statsObject.connection.localPriority = report.priority;300 statsObject.connection.localProtocol = report.protocol;301 statsObject.connection.localType = report.candidateType;302 }303 }304 break;305 case 'remote-candidate':306 if (report.hasOwnProperty('id')) {307 if (report.id.indexOf(308 statsObject.connection.remoteCandidateId) !== -1) {309 statsObject.connection.remoteIp = report.ip;310 statsObject.connection.remotePort = report.port;311 statsObject.connection.remotePriority = report.priority;312 statsObject.connection.remoteProtocol = report.protocol;313 statsObject.connection.remoteType = report.candidateType;314 }315 }316 break;317 default:318 return;319 }320 }.bind());321 }322 return statsObject;323}324// Takes two stats reports and determines the rate based on two counter readings325// and the time between them (which is in units of milliseconds).326function computeRate(newReport, oldReport, statName) {327 var newVal = newReport[statName];328 var oldVal = (oldReport) ? oldReport[statName] : null;329 if (newVal === null || oldVal === null) {330 return null;331 }332 return (newVal - oldVal) / (newReport.timestamp - oldReport.timestamp) * 1000;333}334// Convert a byte rate to a bit rate.335function computeBitrate(newReport, oldReport, statName) {336 return computeRate(newReport, oldReport, statName) * 8;337}338// Computes end to end delay based on the capture start time (in NTP format)339// and the current render time (in seconds since start of render).340function computeE2EDelay(captureStart, remoteVideoCurrentTime) {341 if (!captureStart) {342 return null;343 }344 // Adding offset (milliseconds between 1900 and 1970) to get NTP time.345 var nowNTP = Date.now() + 2208988800000;346 return nowNTP - captureStart - remoteVideoCurrentTime * 1000;...

Full Screen

Full Screen

ideologies.js

Source:ideologies.js Github

copy

Full Screen

1ideologies = [2 {3 "name": "Anarcho-Communism",4 "stats": {5 "econ": 100,6 "dipl": 50,7 "govt": 100,8 "scty": 909 }10 },11 {12 "name": "Libertarian Communism",13 "stats": {14 "econ": 100,15 "dipl": 70,16 "govt": 80,17 "scty": 8018 }19 },20 {21 "name": "Trotskyism",22 "stats": {23 "econ": 100,24 "dipl": 100,25 "govt": 60,26 "scty": 8027 }28 },29 {30 "name": "Marxism",31 "stats": {32 "econ": 100,33 "dipl": 70,34 "govt": 40,35 "scty": 8036 }37 },38 {39 "name": "De Leonism",40 "stats": {41 "econ": 100,42 "dipl": 30,43 "govt": 30,44 "scty": 8045 }46 },47 {48 "name": "Leninism",49 "stats": {50 "econ": 100,51 "dipl": 40,52 "govt": 20,53 "scty": 7054 }55 },56 {57 "name": "Stalinism/Maoism",58 "stats": {59 "econ": 100,60 "dipl": 20,61 "govt": 0,62 "scty": 6063 }64 },65 {66 "name": "Religious Communism",67 "stats": {68 "econ": 100,69 "dipl": 50,70 "govt": 30,71 "scty": 3072 }73 },74 {75 "name": "State Socialism",76 "stats": {77 "econ": 80,78 "dipl": 30,79 "govt": 30,80 "scty": 7081 }82 },83 {84 "name": "Theocratic Socialism",85 "stats": {86 "econ": 80,87 "dipl": 50,88 "govt": 30,89 "scty": 2090 }91 },92 {93 "name": "Religious Socialism",94 "stats": {95 "econ": 80,96 "dipl": 50,97 "govt": 70,98 "scty": 2099 }100 },101 {102 "name": "Democratic Socialism",103 "stats": {104 "econ": 80,105 "dipl": 50,106 "govt": 50,107 "scty": 80108 }109 },110 {111 "name": "Revolutionary Socialism",112 "stats": {113 "econ": 80,114 "dipl": 20,115 "govt": 50,116 "scty": 70117 }118 },119 {120 "name": "Libertarian Socialism",121 "stats": {122 "econ": 80,123 "dipl": 80,124 "govt": 80,125 "scty": 80126 }127 },128 {129 "name": "Anarcho-Syndicalism",130 "stats": {131 "econ": 80,132 "dipl": 50,133 "govt": 100,134 "scty": 80135 }136 },137 {138 "name": "Left-Wing Populism",139 "stats": {140 "econ": 60,141 "dipl": 40,142 "govt": 30,143 "scty": 70144 }145 },146 {147 "name": "Theocratic Distributism",148 "stats": {149 "econ": 60,150 "dipl": 40,151 "govt": 30,152 "scty": 20153 }154 },155 {156 "name": "Distributism",157 "stats": {158 "econ": 60,159 "dipl": 50,160 "govt": 50,161 "scty": 20162 }163 },164 {165 "name": "Social Liberalism",166 "stats": {167 "econ": 60,168 "dipl": 60,169 "govt": 60,170 "scty": 80171 }172 },173 {174 "name": "Christian Democracy",175 "stats": {176 "econ": 60,177 "dipl": 60,178 "govt": 50,179 "scty": 30180 }181 },182 {183 "name": "Social Democracy",184 "stats": {185 "econ": 60,186 "dipl": 70,187 "govt": 60,188 "scty": 80189 }190 },191 {192 "name": "Progressivism",193 "stats": {194 "econ": 60,195 "dipl": 80,196 "govt": 60,197 "scty": 100198 }199 },200 {201 "name": "Anarcho-Mutualism",202 "stats": {203 "econ": 60,204 "dipl": 50,205 "govt": 100,206 "scty": 70207 }208 },209 {210 "name": "National Totalitarianism",211 "stats": {212 "econ": 50,213 "dipl": 20,214 "govt": 0,215 "scty": 50216 }217 },218 {219 "name": "Global Totalitarianism",220 "stats": {221 "econ": 50,222 "dipl": 80,223 "govt": 0,224 "scty": 50225 }226 },227 {228 "name": "Technocracy",229 "stats": {230 "econ": 60,231 "dipl": 60,232 "govt": 20,233 "scty": 70234 }235 },236 {237 "name": "Centrist",238 "stats": {239 "econ": 50,240 "dipl": 50,241 "govt": 50,242 "scty": 50243 }244 },245 {246 "name": "Liberalism",247 "stats": {248 "econ": 50,249 "dipl": 60,250 "govt": 60,251 "scty": 60252 }253 },254 {255 "name": "Religious Anarchism",256 "stats": {257 "econ": 50,258 "dipl": 50,259 "govt": 100,260 "scty": 20261 }262 },263 {264 "name": "Right-Wing Populism",265 "stats": {266 "econ": 40,267 "dipl": 30,268 "govt": 30,269 "scty": 30270 }271 },272 {273 "name": "Moderate Conservatism",274 "stats": {275 "econ": 40,276 "dipl": 40,277 "govt": 50,278 "scty": 30279 }280 },281 {282 "name": "Reactionary",283 "stats": {284 "econ": 40,285 "dipl": 40,286 "govt": 40,287 "scty": 10288 }289 },290 {291 "name": "Social Libertarianism",292 "stats": {293 "econ": 60,294 "dipl": 70,295 "govt": 80,296 "scty": 70297 }298 },299 {300 "name": "Libertarianism",301 "stats": {302 "econ": 40,303 "dipl": 60,304 "govt": 80,305 "scty": 60306 }307 },308 {309 "name": "Anarcho-Egoism",310 "stats": {311 "econ": 40,312 "dipl": 50,313 "govt": 100,314 "scty": 50315 }316 },317 {318 "name": "Nazism",319 "stats": {320 "econ": 40,321 "dipl": 0,322 "govt": 0,323 "scty": 5324 }325 },326 {327 "name": "Autocracy",328 "stats": {329 "econ": 50,330 "dipl": 20,331 "govt": 20,332 "scty": 50333 }334 },335 {336 "name": "Fascism",337 "stats": {338 "econ": 40,339 "dipl": 20,340 "govt": 20,341 "scty": 20342 }343 },344 {345 "name": "Capitalist Fascism",346 "stats": {347 "econ": 20,348 "dipl": 20,349 "govt": 20,350 "scty": 20351 }352 },353 {354 "name": "Conservatism",355 "stats": {356 "econ": 30,357 "dipl": 40,358 "govt": 40,359 "scty": 20360 }361 },362 {363 "name": "Neo-Liberalism",364 "stats": {365 "econ": 30,366 "dipl": 30,367 "govt": 50,368 "scty": 60369 }370 },371 {372 "name": "Classical Liberalism",373 "stats": {374 "econ": 30,375 "dipl": 60,376 "govt": 60,377 "scty": 80378 }379 },380 {381 "name": "Authoritarian Capitalism",382 "stats": {383 "econ": 20,384 "dipl": 30,385 "govt": 20,386 "scty": 40387 }388 },389 {390 "name": "State Capitalism",391 "stats": {392 "econ": 20,393 "dipl": 50,394 "govt": 30,395 "scty": 50396 }397 },398 {399 "name": "Neo-Conservatism",400 "stats": {401 "econ": 20,402 "dipl": 20,403 "govt": 40,404 "scty": 20405 }406 },407 {408 "name": "Fundamentalism",409 "stats": {410 "econ": 20,411 "dipl": 30,412 "govt": 30,413 "scty": 5414 }415 },416 {417 "name": "Libertarian Capitalism",418 "stats": {419 "econ": 20,420 "dipl": 50,421 "govt": 80,422 "scty": 60423 }424 },425 {426 "name": "Market Anarchism",427 "stats": {428 "econ": 20,429 "dipl": 50,430 "govt": 100,431 "scty": 50432 }433 },434 {435 "name": "Objectivism",436 "stats": {437 "econ": 10,438 "dipl": 50,439 "govt": 90,440 "scty": 40441 }442 },443 {444 "name": "Totalitarian Capitalism",445 "stats": {446 "econ": 0,447 "dipl": 30,448 "govt": 0,449 "scty": 50450 }451 },452 {453 "name": "Ultra-Capitalism",454 "stats": {455 "econ": 0,456 "dipl": 40,457 "govt": 50,458 "scty": 50459 }460 },461 {462 "name": "Anarcho-Capitalism",463 "stats": {464 "econ": 0,465 "dipl": 50,466 "govt": 100,467 "scty": 50468 }469 } ...

Full Screen

Full Screen

Compiler-caching.test.js

Source:Compiler-caching.test.js Github

copy

Full Screen

1/* globals describe, it */2"use strict";3const path = require("path");4const fs = require("fs");5const rimraf = require("rimraf");6const webpack = require("../");7const WebpackOptionsDefaulter = require("../lib/WebpackOptionsDefaulter");8let fixtureCount = 0;9describe("Compiler (caching)", () => {10 jest.setTimeout(15000);11 function compile(entry, options, callback) {12 options.mode = "none";13 options = new WebpackOptionsDefaulter().process(options);14 options.cache = true;15 options.entry = entry;16 options.optimization.minimize = false;17 options.context = path.join(__dirname, "fixtures");18 options.output.path = "/";19 options.output.filename = "bundle.js";20 options.output.pathinfo = true;21 const logs = {22 mkdirp: [],23 writeFile: []24 };25 const c = webpack(options);26 const files = {};27 c.outputFileSystem = {28 join() {29 return [].join.call(arguments, "/").replace(/\/+/g, "/");30 },31 mkdirp(path, callback) {32 logs.mkdirp.push(path);33 callback();34 },35 writeFile(name, content, callback) {36 logs.writeFile.push(name, content);37 files[name] = content.toString("utf-8");38 callback();39 }40 };41 c.hooks.compilation.tap(42 "CompilerCachingTest",43 compilation => (compilation.bail = true)44 );45 let compilerIteration = 1;46 function runCompiler(options, callback) {47 if (typeof options === "function") {48 callback = options;49 options = {};50 }51 c.run((err, stats) => {52 if (err) throw err;53 expect(typeof stats).toBe("object");54 stats = stats.toJson({55 modules: true,56 reasons: true57 });58 expect(typeof stats).toBe("object");59 expect(stats).toHaveProperty("errors");60 expect(Array.isArray(stats.errors)).toBe(true);61 if (options.expectErrors) {62 expect(stats.errors).toHaveLength(options.expectErrors);63 } else {64 if (stats.errors.length > 0) {65 expect(typeof stats.errors[0]).toBe("string");66 throw new Error(stats.errors[0]);67 }68 }69 stats.logs = logs;70 callback(stats, files, compilerIteration++);71 });72 }73 runCompiler(callback);74 return {75 compilerInstance: c,76 runAgain: runCompiler77 };78 }79 const tempFixturePath = path.join(80 __dirname,81 "fixtures",82 "temp-cache-fixture"83 );84 function cleanup() {85 rimraf.sync(`${tempFixturePath}-*`);86 }87 beforeAll(cleanup);88 afterAll(cleanup);89 function createTempFixture() {90 const fixturePath = `${tempFixturePath}-${fixtureCount}`;91 const aFilepath = path.join(fixturePath, "a.js");92 const cFilepath = path.join(fixturePath, "c.js");93 // Remove previous copy if present94 rimraf.sync(fixturePath);95 // Copy over file since we"ll be modifying some of them96 fs.mkdirSync(fixturePath);97 fs.createReadStream(path.join(__dirname, "fixtures", "a.js")).pipe(98 fs.createWriteStream(aFilepath)99 );100 fs.createReadStream(path.join(__dirname, "fixtures", "c.js")).pipe(101 fs.createWriteStream(cFilepath)102 );103 fixtureCount++;104 return {105 rootPath: fixturePath,106 aFilepath: aFilepath,107 cFilepath: cFilepath108 };109 }110 it("should cache single file (with manual 1s wait) ", done => {111 const options = {};112 const tempFixture = createTempFixture();113 const helper = compile(tempFixture.cFilepath, options, (stats, files) => {114 // Not cached the first time115 expect(stats.assets[0].name).toBe("bundle.js");116 expect(stats.assets[0].emitted).toBe(true);117 helper.runAgain((stats, files, iteration) => {118 // Cached the second run119 expect(stats.assets[0].name).toBe("bundle.js");120 expect(stats.assets[0].emitted).toBe(false);121 const aContent = fs122 .readFileSync(tempFixture.aFilepath)123 .toString()124 .replace("This is a", "This is a MODIFIED");125 setTimeout(() => {126 fs.writeFileSync(tempFixture.aFilepath, aContent);127 helper.runAgain((stats, files, iteration) => {128 // Cached the third run129 expect(stats.assets[0].name).toBe("bundle.js");130 expect(stats.assets[0].emitted).toBe(true);131 done();132 });133 }, 1100);134 });135 });136 });137 it("should cache single file (even with no timeout) ", done => {138 const options = {};139 const tempFixture = createTempFixture();140 const helper = compile(tempFixture.cFilepath, options, (stats, files) => {141 // Not cached the first time142 expect(stats.assets[0].name).toBe("bundle.js");143 expect(stats.assets[0].emitted).toBe(true);144 helper.runAgain((stats, files, iteration) => {145 // Cached the second run146 expect(stats.assets[0].name).toBe("bundle.js");147 expect(stats.assets[0].emitted).toBe(false);148 expect(files["/bundle.js"]).toMatch("This is a");149 const aContent = fs150 .readFileSync(tempFixture.aFilepath)151 .toString()152 .replace("This is a", "This is a MODIFIED");153 fs.writeFileSync(tempFixture.aFilepath, aContent);154 helper.runAgain((stats, files, iteration) => {155 // Cached the third run156 expect(stats.assets[0].name).toBe("bundle.js");157 expect(stats.assets[0].emitted).toBe(true);158 expect(files["/bundle.js"]).toMatch("This is a MODIFIED");159 done();160 });161 });162 });163 });164 it("should only build when modified (with manual 2s wait)", done => {165 const options = {};166 const tempFixture = createTempFixture();167 const helper = compile(tempFixture.cFilepath, options, (stats, files) => {168 // Built the first time169 expect(stats.modules[0].name).toMatch("c.js");170 expect(stats.modules[0].built).toBe(true);171 expect(stats.modules[1].name).toMatch("a.js");172 expect(stats.modules[1].built).toBe(true);173 setTimeout(() => {174 helper.runAgain((stats, files, iteration) => {175 // Not built when cached the second run176 expect(stats.modules[0].name).toMatch("c.js");177 // expect(stats.modules[0].built).toBe(false);178 expect(stats.modules[1].name).toMatch("a.js");179 // expect(stats.modules[1].built).toBe(false);180 const aContent = fs181 .readFileSync(tempFixture.aFilepath)182 .toString()183 .replace("This is a", "This is a MODIFIED");184 setTimeout(() => {185 fs.writeFileSync(tempFixture.aFilepath, aContent);186 helper.runAgain((stats, files, iteration) => {187 // And only a.js built after it was modified188 expect(stats.modules[0].name).toMatch("c.js");189 expect(stats.modules[0].built).toBe(false);190 expect(stats.modules[1].name).toMatch("a.js");191 expect(stats.modules[1].built).toBe(true);192 done();193 });194 }, 2100);195 });196 }, 4100);197 });198 });199 it("should build when modified (even with no timeout)", done => {200 const options = {};201 const tempFixture = createTempFixture();202 const helper = compile(tempFixture.cFilepath, options, (stats, files) => {203 // Built the first time204 expect(stats.modules[0].name).toMatch("c.js");205 expect(stats.modules[0].built).toBe(true);206 expect(stats.modules[1].name).toMatch("a.js");207 expect(stats.modules[1].built).toBe(true);208 helper.runAgain((stats, files, iteration) => {209 // Not built when cached the second run210 expect(stats.modules[0].name).toMatch("c.js");211 // expect(stats.modules[0].built).toBe(false);212 expect(stats.modules[1].name).toMatch("a.js");213 // expect(stats.modules[1].built).toBe(false);214 const aContent = fs215 .readFileSync(tempFixture.aFilepath)216 .toString()217 .replace("This is a", "This is a MODIFIED");218 fs.writeFileSync(tempFixture.aFilepath, aContent);219 helper.runAgain((stats, files, iteration) => {220 // And only a.js built after it was modified221 expect(stats.modules[0].name).toMatch("c.js");222 // expect(stats.modules[0].built).toBe(false);223 expect(stats.modules[1].name).toMatch("a.js");224 expect(stats.modules[1].built).toBe(true);225 done();226 });227 });228 });229 });...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run locust automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful