How to use bye method in lisa

Best Python code snippet using lisa_python

py00395ghost.py

Source:py00395ghost.py Github

copy

Full Screen

...1134 game.global_vars[696] = 91135 game.global_flags[869] = 01136 game.quests[83].state = qs_completed1137 return RUN_DEFAULT1138def bye_bye( attachee, triggerer ):1139 attachee.object_flag_set(OF_OFF)...

Full Screen

Full Screen

toWarnDev-test.js

Source:toWarnDev-test.js Github

copy

Full Screen

1/**2 * Copyright (c) Facebook, Inc. and its affiliates.3 *4 * This source code is licensed under the MIT license found in the5 * LICENSE file in the root directory of this source tree.6 *7 * @emails react-core8 */9'use strict';10describe('toErrorDev', () => {11 it('does not fail if a warning contains a stack', () => {12 expect(() => {13 if (__DEV__) {14 console.error('Hello\n in div');15 }16 }).toErrorDev('Hello');17 });18 it('does not fail if all warnings contain a stack', () => {19 expect(() => {20 if (__DEV__) {21 console.error('Hello\n in div');22 console.error('Good day\n in div');23 console.error('Bye\n in div');24 }25 }).toErrorDev(['Hello', 'Good day', 'Bye']);26 });27 it('does not fail if warnings without stack explicitly opt out', () => {28 expect(() => {29 if (__DEV__) {30 console.error('Hello');31 }32 }).toErrorDev('Hello', {withoutStack: true});33 expect(() => {34 if (__DEV__) {35 console.error('Hello');36 console.error('Good day');37 console.error('Bye');38 }39 }).toErrorDev(['Hello', 'Good day', 'Bye'], {withoutStack: true});40 });41 it('does not fail when expected stack-less warning number matches the actual one', () => {42 expect(() => {43 if (__DEV__) {44 console.error('Hello\n in div');45 console.error('Good day');46 console.error('Bye\n in div');47 }48 }).toErrorDev(['Hello', 'Good day', 'Bye'], {withoutStack: 1});49 });50 if (__DEV__) {51 // Helper methods avoids invalid toWarn().toThrow() nesting52 // See no-to-warn-dev-within-to-throw53 const expectToWarnAndToThrow = (expectBlock, expectedErrorMessage) => {54 let caughtError;55 try {56 expectBlock();57 } catch (error) {58 caughtError = error;59 }60 expect(caughtError).toBeDefined();61 expect(caughtError.message).toContain(expectedErrorMessage);62 };63 it('fails if a warning does not contain a stack', () => {64 expectToWarnAndToThrow(() => {65 expect(() => {66 console.error('Hello');67 }).toErrorDev('Hello');68 }, 'Received warning unexpectedly does not include a component stack');69 });70 it('fails if some warnings do not contain a stack', () => {71 expectToWarnAndToThrow(() => {72 expect(() => {73 console.error('Hello\n in div');74 console.error('Good day\n in div');75 console.error('Bye');76 }).toErrorDev(['Hello', 'Good day', 'Bye']);77 }, 'Received warning unexpectedly does not include a component stack');78 expectToWarnAndToThrow(() => {79 expect(() => {80 console.error('Hello');81 console.error('Good day\n in div');82 console.error('Bye\n in div');83 }).toErrorDev(['Hello', 'Good day', 'Bye']);84 }, 'Received warning unexpectedly does not include a component stack');85 expectToWarnAndToThrow(() => {86 expect(() => {87 console.error('Hello\n in div');88 console.error('Good day');89 console.error('Bye\n in div');90 }).toErrorDev(['Hello', 'Good day', 'Bye']);91 }, 'Received warning unexpectedly does not include a component stack');92 expectToWarnAndToThrow(() => {93 expect(() => {94 console.error('Hello');95 console.error('Good day');96 console.error('Bye');97 }).toErrorDev(['Hello', 'Good day', 'Bye']);98 }, 'Received warning unexpectedly does not include a component stack');99 });100 it('fails if warning is expected to not have a stack, but does', () => {101 expectToWarnAndToThrow(() => {102 expect(() => {103 console.error('Hello\n in div');104 }).toErrorDev('Hello', {withoutStack: true});105 }, 'Received warning unexpectedly includes a component stack');106 expectToWarnAndToThrow(() => {107 expect(() => {108 console.error('Hello\n in div');109 console.error('Good day');110 console.error('Bye\n in div');111 }).toErrorDev(['Hello', 'Good day', 'Bye'], {withoutStack: true});112 }, 'Received warning unexpectedly includes a component stack');113 });114 it('fails if expected stack-less warning number does not match the actual one', () => {115 expectToWarnAndToThrow(() => {116 expect(() => {117 console.error('Hello\n in div');118 console.error('Good day');119 console.error('Bye\n in div');120 }).toErrorDev(['Hello', 'Good day', 'Bye'], {withoutStack: 4});121 }, 'Expected 4 warnings without a component stack but received 1');122 });123 it('fails if withoutStack is invalid', () => {124 expectToWarnAndToThrow(() => {125 expect(() => {126 console.error('Hi');127 }).toErrorDev('Hi', {withoutStack: null});128 }, 'Instead received object');129 expectToWarnAndToThrow(() => {130 expect(() => {131 console.error('Hi');132 }).toErrorDev('Hi', {withoutStack: {}});133 }, 'Instead received object');134 expectToWarnAndToThrow(() => {135 expect(() => {136 console.error('Hi');137 }).toErrorDev('Hi', {withoutStack: 'haha'});138 }, 'Instead received string');139 });140 it('fails if the argument number does not match', () => {141 expectToWarnAndToThrow(() => {142 expect(() => {143 console.error('Hi %s', 'Sara', 'extra');144 }).toErrorDev('Hi', {withoutStack: true});145 }, 'Received 2 arguments for a message with 1 placeholders');146 expectToWarnAndToThrow(() => {147 expect(() => {148 console.error('Hi %s');149 }).toErrorDev('Hi', {withoutStack: true});150 }, 'Received 0 arguments for a message with 1 placeholders');151 });152 it('fails if stack is passed twice', () => {153 expectToWarnAndToThrow(() => {154 expect(() => {155 console.error('Hi %s%s', '\n in div', '\n in div');156 }).toErrorDev('Hi');157 }, 'Received more than one component stack for a warning');158 });159 it('fails if multiple strings are passed without an array wrapper', () => {160 expectToWarnAndToThrow(() => {161 expect(() => {162 console.error('Hi \n in div');163 }).toErrorDev('Hi', 'Bye');164 }, 'toErrorDev() second argument, when present, should be an object');165 expectToWarnAndToThrow(() => {166 expect(() => {167 console.error('Hi \n in div');168 console.error('Bye \n in div');169 }).toErrorDev('Hi', 'Bye');170 }, 'toErrorDev() second argument, when present, should be an object');171 expectToWarnAndToThrow(() => {172 expect(() => {173 console.error('Hi \n in div');174 console.error('Wow \n in div');175 console.error('Bye \n in div');176 }).toErrorDev('Hi', 'Bye');177 }, 'toErrorDev() second argument, when present, should be an object');178 expectToWarnAndToThrow(() => {179 expect(() => {180 console.error('Hi \n in div');181 console.error('Wow \n in div');182 console.error('Bye \n in div');183 }).toErrorDev('Hi', 'Wow', 'Bye');184 }, 'toErrorDev() second argument, when present, should be an object');185 });186 it('fails on more than two arguments', () => {187 expectToWarnAndToThrow(() => {188 expect(() => {189 console.error('Hi \n in div');190 console.error('Wow \n in div');191 console.error('Bye \n in div');192 }).toErrorDev('Hi', undefined, 'Bye');193 }, 'toErrorDev() received more than two arguments.');194 });195 }196});197describe('toWarnDev', () => {198 it('does not fail if a warning contains a stack', () => {199 expect(() => {200 if (__DEV__) {201 console.warn('Hello\n in div');202 }203 }).toWarnDev('Hello');204 });205 it('does not fail if all warnings contain a stack', () => {206 expect(() => {207 if (__DEV__) {208 console.warn('Hello\n in div');209 console.warn('Good day\n in div');210 console.warn('Bye\n in div');211 }212 }).toWarnDev(['Hello', 'Good day', 'Bye']);213 });214 it('does not fail if warnings without stack explicitly opt out', () => {215 expect(() => {216 if (__DEV__) {217 console.warn('Hello');218 }219 }).toWarnDev('Hello', {withoutStack: true});220 expect(() => {221 if (__DEV__) {222 console.warn('Hello');223 console.warn('Good day');224 console.warn('Bye');225 }226 }).toWarnDev(['Hello', 'Good day', 'Bye'], {withoutStack: true});227 });228 it('does not fail when expected stack-less warning number matches the actual one', () => {229 expect(() => {230 if (__DEV__) {231 console.warn('Hello\n in div');232 console.warn('Good day');233 console.warn('Bye\n in div');234 }235 }).toWarnDev(['Hello', 'Good day', 'Bye'], {withoutStack: 1});236 });237 if (__DEV__) {238 // Helper methods avoids invalid toWarn().toThrow() nesting239 // See no-to-warn-dev-within-to-throw240 const expectToWarnAndToThrow = (expectBlock, expectedErrorMessage) => {241 let caughtError;242 try {243 expectBlock();244 } catch (error) {245 caughtError = error;246 }247 expect(caughtError).toBeDefined();248 expect(caughtError.message).toContain(expectedErrorMessage);249 };250 it('fails if a warning does not contain a stack', () => {251 expectToWarnAndToThrow(() => {252 expect(() => {253 console.warn('Hello');254 }).toWarnDev('Hello');255 }, 'Received warning unexpectedly does not include a component stack');256 });257 it('fails if some warnings do not contain a stack', () => {258 expectToWarnAndToThrow(() => {259 expect(() => {260 console.warn('Hello\n in div');261 console.warn('Good day\n in div');262 console.warn('Bye');263 }).toWarnDev(['Hello', 'Good day', 'Bye']);264 }, 'Received warning unexpectedly does not include a component stack');265 expectToWarnAndToThrow(() => {266 expect(() => {267 console.warn('Hello');268 console.warn('Good day\n in div');269 console.warn('Bye\n in div');270 }).toWarnDev(['Hello', 'Good day', 'Bye']);271 }, 'Received warning unexpectedly does not include a component stack');272 expectToWarnAndToThrow(() => {273 expect(() => {274 console.warn('Hello\n in div');275 console.warn('Good day');276 console.warn('Bye\n in div');277 }).toWarnDev(['Hello', 'Good day', 'Bye']);278 }, 'Received warning unexpectedly does not include a component stack');279 expectToWarnAndToThrow(() => {280 expect(() => {281 console.warn('Hello');282 console.warn('Good day');283 console.warn('Bye');284 }).toWarnDev(['Hello', 'Good day', 'Bye']);285 }, 'Received warning unexpectedly does not include a component stack');286 });287 it('fails if warning is expected to not have a stack, but does', () => {288 expectToWarnAndToThrow(() => {289 expect(() => {290 console.warn('Hello\n in div');291 }).toWarnDev('Hello', {withoutStack: true});292 }, 'Received warning unexpectedly includes a component stack');293 expectToWarnAndToThrow(() => {294 expect(() => {295 console.warn('Hello\n in div');296 console.warn('Good day');297 console.warn('Bye\n in div');298 }).toWarnDev(['Hello', 'Good day', 'Bye'], {299 withoutStack: true,300 });301 }, 'Received warning unexpectedly includes a component stack');302 });303 it('fails if expected stack-less warning number does not match the actual one', () => {304 expectToWarnAndToThrow(() => {305 expect(() => {306 console.warn('Hello\n in div');307 console.warn('Good day');308 console.warn('Bye\n in div');309 }).toWarnDev(['Hello', 'Good day', 'Bye'], {310 withoutStack: 4,311 });312 }, 'Expected 4 warnings without a component stack but received 1');313 });314 it('fails if withoutStack is invalid', () => {315 expectToWarnAndToThrow(() => {316 expect(() => {317 console.warn('Hi');318 }).toWarnDev('Hi', {withoutStack: null});319 }, 'Instead received object');320 expectToWarnAndToThrow(() => {321 expect(() => {322 console.warn('Hi');323 }).toWarnDev('Hi', {withoutStack: {}});324 }, 'Instead received object');325 expectToWarnAndToThrow(() => {326 expect(() => {327 console.warn('Hi');328 }).toWarnDev('Hi', {withoutStack: 'haha'});329 }, 'Instead received string');330 });331 it('fails if the argument number does not match', () => {332 expectToWarnAndToThrow(() => {333 expect(() => {334 console.warn('Hi %s', 'Sara', 'extra');335 }).toWarnDev('Hi', {withoutStack: true});336 }, 'Received 2 arguments for a message with 1 placeholders');337 expectToWarnAndToThrow(() => {338 expect(() => {339 console.warn('Hi %s');340 }).toWarnDev('Hi', {withoutStack: true});341 }, 'Received 0 arguments for a message with 1 placeholders');342 });343 it('fails if stack is passed twice', () => {344 expectToWarnAndToThrow(() => {345 expect(() => {346 console.warn('Hi %s%s', '\n in div', '\n in div');347 }).toWarnDev('Hi');348 }, 'Received more than one component stack for a warning');349 });350 it('fails if multiple strings are passed without an array wrapper', () => {351 expectToWarnAndToThrow(() => {352 expect(() => {353 console.warn('Hi \n in div');354 }).toWarnDev('Hi', 'Bye');355 }, 'toWarnDev() second argument, when present, should be an object');356 expectToWarnAndToThrow(() => {357 expect(() => {358 console.warn('Hi \n in div');359 console.warn('Bye \n in div');360 }).toWarnDev('Hi', 'Bye');361 }, 'toWarnDev() second argument, when present, should be an object');362 expectToWarnAndToThrow(() => {363 expect(() => {364 console.warn('Hi \n in div');365 console.warn('Wow \n in div');366 console.warn('Bye \n in div');367 }).toWarnDev('Hi', 'Bye');368 }, 'toWarnDev() second argument, when present, should be an object');369 expectToWarnAndToThrow(() => {370 expect(() => {371 console.warn('Hi \n in div');372 console.warn('Wow \n in div');373 console.warn('Bye \n in div');374 }).toWarnDev('Hi', 'Wow', 'Bye');375 }, 'toWarnDev() second argument, when present, should be an object');376 });377 it('fails on more than two arguments', () => {378 expectToWarnAndToThrow(() => {379 expect(() => {380 console.warn('Hi \n in div');381 console.warn('Wow \n in div');382 console.warn('Bye \n in div');383 }).toWarnDev('Hi', undefined, 'Bye');384 }, 'toWarnDev() received more than two arguments.');385 });386 }...

Full Screen

Full Screen

seed.py

Source:seed.py Github

copy

Full Screen

1db.session.create_all()2 3player1= Players(player_id=2434, name='Christian McCaffrey', position='RB', team='CAR', adp=1.2, high=1, low=4, stdev=0.5,bye=13)4player2= Players(player_id=2432, name= 'Dalvin Cook', position= 'RB', team= 'MIN', adp= 2.6, high= 1, low= 5, stdev= 0.7, bye= 7)5player3= Players(player_id=2350, name= 'Derrick Henry', position= 'RB', team= 'TEN', adp= 4.1, high= 1, low= 8, stdev= 1.3, bye= 13)6player4= Players(player_id=2860, name= 'Saquon Barkley', position= 'RB', team= 'NYG', adp= 4.2, high= 1, low= 8, stdev= 1.3, bye= 10)7player5= Players(player_id=2439, name= 'Alvin Kamara', position= 'RB', team= 'NO', adp= 4.5, high= 1, low= 9, stdev= 1.3, bye= 6)8player6= Players(player_id=4864, name= 'Jonathan Taylor', position= 'RB', team= 'IND', adp= 6.7, high= 2, low= 12, stdev= 1.6, bye= 14)9player7=Players(player_id=2343, name= 'Ezekiel Elliott', position= 'RB', team= 'DAL', adp= 7.1, high= 2, low= 15, stdev= 1.7, bye= 7)10player8=Players(player_id=2863, name= 'Nick Chubb', position= 'RB', team= 'CLE', adp= 8.0, high= 3, low= 14, stdev= 1.9, bye= 13)11player9=Players(player_id=2125, name= 'Davante Adams', position= 'WR', team= 'GB', adp= 8.5, high= 1, low= 15, stdev= 2.6, bye= 13)12player10=Players(player_id=1989, name= 'Travis Kelce', position= 'TE', team= 'KC', adp= 9.1, high= 3, low= 16, stdev= 2.1, bye= 12)13player11=Players(player_id=2390, name= 'Tyreek Hill', position= 'WR', team= 'KC', adp= 11.0, high= 5, low= 17, stdev= 2.2, bye= 12)14player12=Players(player_id=2507, name= 'Aaron Jones', position= 'RB', team= 'GB', adp= 11.0, high= 5, low= 19, stdev= 2.1, bye= 13)15player13=Players(player_id=2625, name= 'Austin Ekeler', position= 'RB', team= 'LAC', adp= 11.9, high= 5, low= 19, stdev= 2.4, bye= 7)16player14=Players(player_id=2316, name= 'Stefon Diggs', position= 'WR', team= 'BUF', adp= 13.2, high= 6, low= 19, stdev= 2.5, bye= 7)17player15=Players(player_id= 4881, name= 'Cam Akers', position= 'RB', team= 'LAR', adp= 15.0, high= 7, low= 23, stdev= 2.7, bye= 11)18player16=Players(player_id= 1975, name= 'DeAndre Hopkins', position= 'WR', team= 'ARI', adp= 15.2, high= 8, low= 22, stdev= 2.6, bye= 12)19player17=Players(player_id= 5008, name= 'Antonio Gibson', position= 'RB', team= 'WAS', adp= 16.1, high= 10, low= 22, stdev= 2.3, bye= 9)20player18=Players(player_id= 3239, name= 'D.K. Metcalf', position= 'WR', team= 'SEA', adp= 17.2, high= 9, low= 27, stdev= 3.1, bye= 9)21player19=Players(player_id= 2866, name= 'Calvin Ridley', position= 'WR', team= 'ATL', adp= 19.7, high= 12, low= 29, stdev= 2.7, bye= 6)22player20=Players(player_id= 2499, name= 'George Kittle', position= 'TE', team= 'SF', adp= 20.3, high= 12, low= 29, stdev= 3.2, bye= 6)23player21=Players(player_id= 2322, name= 'Darren Waller', position= 'TE', team= 'LV', adp= 21.1, high= 12, low= 29, stdev= 3.1, bye= 8)24player22=Players(player_id= 2462, name= 'Pat Mahomes', position= 'QB', team= 'KC', adp= 21.1, high= 8, low= 32, stdev= 5.0, bye= 12)25player23=Players(player_id= 4862, name= "D'Andre Swift", position= 'RB', team= 'DET', adp= 21.7, high= 11, low= 32, stdev= 3.9, bye= 9)26player24=Players(player_id= 3247, name= 'A.J. Brown', position= 'WR', team= 'TEN', adp= 22.1, high= 12, low= 32, stdev= 3.5, bye= 13)27player25=Players(player_id= 2438, name= 'Joe Mixon', position= 'RB', team= 'CIN', adp= 23.3, high= 9, low= 36, stdev= 5.2, bye= 10)28player26=Players(player_id= 1992, name= 'Keenan Allen', position= 'WR', team= 'LAC', adp= 24.8, high= 16, low= 34, stdev= 3.3, bye= 7)29player27=Players(player_id= 2357, name= 'Michael Thomas', position= 'WR', team= 'NO', adp= 25.8, high= 16, low= 37, stdev= 3.8, bye= 6)30player28=Players(player_id= 3255, name= 'Josh Jacobs', position= 'RB', team= 'LV', adp= 26.7, high= 14, low= 37, stdev= 4.8, bye= 8)31player29=Players(player_id= 4888, name= 'J.K. Dobbins', position= 'RB', team= 'BAL', adp= 27.0, high= 15, low= 38, stdev= 4.4, bye= 8)32player30=Players(player_id= 4876, name= 'Justin Jefferson', position= 'WR', team= 'MIN', adp= 27.0, high= 18, low= 37, stdev= 3.4, bye= 7)33player31=Players(player_id= 5162, name= 'James Robinson', position= 'RB', team= 'JAX', adp= 27.9, high= 1, low= 49, stdev= 11.0, bye= 7)34player32=Players(player_id= 4889, name= 'Clyde Edwards-Helaire', position= 'RB', team= 'KC', adp= 28.5, high= 17, low= 40, stdev= 4.4, bye= 12)35player33=Players(player_id= 3252, name= 'Miles Sanders', position= 'RB', team= 'PHI', adp= 30.5, high= 20, low= 40, stdev= 3.9, bye= 14)36player34=Players(player_id= 3238, name= 'David Montgomery', position= 'RB', team= 'CHI', adp= 31.8, high= 20, low= 42, stdev= 4.2, bye= 10)37player35=Players(player_id= 2130, name= 'Allen Robinson', position= 'WR', team= 'CHI', adp= 34.5, high= 25, low= 47, stdev= 3.6, bye= 10)38player36=Players(player_id= 2518, name= 'Chris Carson', position= 'RB', team= 'SEA', adp= 36.0, high= 27, low= 47, stdev= 3.3, bye= 9)39player37=Players(player_id= 3449, name= 'Terry McLaurin', position= 'WR', team= 'WAS', adp= 36.1, high= 25, low= 46, stdev= 3.9, bye= 9)40player38=Players(player_id= 2885, name= 'Josh Allen', position= 'QB', team= 'BUF', adp= 36.3, high= 22, low= 53, stdev= 5.4, bye= 7)41player39=Players(player_id= 2111, name= 'Mike Evans', position= 'WR', team= 'TB', adp= 37.3, high= 26, low= 51, stdev= 4.0, bye= 9)42player40=Players(player_id= 1796, name= 'Julio Jones', position= 'WR', team= 'ATL', adp= 37.9, high= 26, low= 48, stdev= 4.2, bye= 6)43player41=Players(player_id= 2277, name= 'Amari Cooper', position= 'WR', team= 'DAL', adp= 40.3, high= 28, low= 53, stdev= 4.5, bye= 7)44player42=Players(player_id= 2450, name= 'Kareem Hunt', position= 'RB', team= 'CLE', adp= 40.7, high= 29, low= 51, stdev= 4.1, bye= 13)45player43=Players(player_id= 3299, name= 'Kyler Murray', position= 'QB', team= 'ARI', adp= 41.3, high= 27, low= 58, stdev= 5.4, bye= 12)46player44=Players(player_id= 2465, name= 'Chris Godwin', position= 'WR', team= 'TB', adp= 43.2, high= 33, low= 56, stdev= 3.9, bye= 9)47player45=Players(player_id= 2737, name= 'Raheem Mostert', position= 'RB', team= 'SF', adp= 43.9, high= 30, low= 59, stdev= 5.2, bye= 6)48player46=Players(player_id= 1981, name= 'Robert Woods', position= 'WR', team= 'LAR', adp= 44.3, high= 34, low= 56, stdev= 3.6, bye= 11)49player47=Players(player_id= 4869, name= 'CeeDee Lamb', position= 'WR', team= 'DAL', adp= 44.8, high= 33, low= 59, stdev= 4.2, bye= 7)50player48=Players(player_id= 2872, name= 'Mark Andrews', position= 'TE', team= 'BAL', adp= 45.4, high= 26, low= 61, stdev= 7.3, bye= 8)51player49= Players(player_id= 2431, name= 'Adam Thielen', position= 'WR', team= 'MIN', adp= 46.6, high= 34, low= 61, stdev= 4.6, bye= 7)52player50= Players(player_id=3258, name= 'Myles Gaskin', position='RB', team='MIA', adp=47.6, high=31, low=63, stdev=6.0, bye=14)53db.session.add_all([player1, player2, player3, player4, player5, player6, player7, player8, player9, player10, player11, player12, player13, player14, player15, player16, player17, player18, player19, player20, player21, player22, player23, player24, player25, player26, player27, player28, player29, player30, player31, player32, player33, player34, player35, player36, player37, player38, player39, player40, player41, player42, player43, player44, player45, player46, player47, player48, player49, player50])...

Full Screen

Full Screen

get-parameter-list.spec.js

Source:get-parameter-list.spec.js Github

copy

Full Screen

1import { getParameterList } from './get-parameter-list.js';2describe('returns an array of strings with the parameter names for a function', () => {3 describe('no parameters', () => {4 it('arrow', () => {5 // the AST representation for an implicit arrow's params is the same6 // no need to test them as well7 const funky = () => {};8 expect(getParameterList(funky)).toEqual([]);9 });10 it('function declaration', () => {11 function funky() {}12 expect(getParameterList(funky)).toEqual([]);13 });14 it('anonymous function expression', () => {15 const funky = function () {};16 expect(getParameterList(funky)).toEqual([]);17 });18 it('named function expression', () => {19 const funky = function funk() {};20 expect(getParameterList(funky)).toEqual([]);21 });22 });23 describe('one parameter', () => {24 it('arrow (with parens)', () => {25 // prettier-ignore26 const funky = (hi) => {};27 expect(getParameterList(funky)).toEqual(['hi']);28 });29 it('arrow (without parens)', () => {30 // prettier-ignore31 const funky = hi => {};32 expect(getParameterList(funky)).toEqual(['hi']);33 });34 it('function declaration', () => {35 function funky(hi) {}36 expect(getParameterList(funky)).toEqual(['hi']);37 });38 it('anonymous function expression', () => {39 const funky = function (hi) {};40 expect(getParameterList(funky)).toEqual(['hi']);41 });42 it('named function expression', () => {43 const funky = function funk(hi) {};44 expect(getParameterList(funky)).toEqual(['hi']);45 });46 });47 describe('multiple parameters', () => {48 it('arrow', () => {49 const funky = (hi, bye, chai) => {};50 expect(getParameterList(funky)).toEqual(['hi', 'bye', 'chai']);51 });52 it('function declaration', () => {53 function funky(hi, bye, chai) {}54 expect(getParameterList(funky)).toEqual(['hi', 'bye', 'chai']);55 });56 it('anonymous function expression', () => {57 const funky = function (hi, bye, chai) {};58 expect(getParameterList(funky)).toEqual(['hi', 'bye', 'chai']);59 });60 it('named function expression', () => {61 const funky = function funk(hi, bye, chai) {};62 expect(getParameterList(funky)).toEqual(['hi', 'bye', 'chai']);63 });64 });65 describe('rest parameters', () => {66 it('arrow', () => {67 const funky = (hi, bye, ...chai) => {};68 expect(getParameterList(funky)).toEqual(['hi', 'bye', 'chai']);69 });70 it('function declaration', () => {71 function funky(hi, bye, ...chai) {}72 expect(getParameterList(funky)).toEqual(['hi', 'bye', 'chai']);73 });74 it('anonymous function expression', () => {75 const funky = function (hi, bye, ...chai) {};76 expect(getParameterList(funky)).toEqual(['hi', 'bye', 'chai']);77 });78 it('named function expression', () => {79 const funky = function funk(hi, bye, ...chai) {};80 expect(getParameterList(funky)).toEqual(['hi', 'bye', 'chai']);81 });82 });83 describe('default parameters', () => {84 it('arrow', () => {85 const funky = (hi = 1, bye = '') => {};86 expect(getParameterList(funky)).toEqual(['hi', 'bye']);87 });88 it('function declaration', () => {89 function funky(hi = 1, bye = '') {}90 expect(getParameterList(funky)).toEqual(['hi', 'bye']);91 });92 it('anonymous function expression', () => {93 const funky = function (hi = 1, bye = '') {};94 expect(getParameterList(funky)).toEqual(['hi', 'bye']);95 });96 it('named function expression', () => {97 const funky = function funk(hi = 1, bye = '') {};98 expect(getParameterList(funky)).toEqual(['hi', 'bye']);99 });100 });101 describe('destructured parameters', () => {102 it('arrow', () => {103 const funky = ({ hi, bye }) => {};104 expect(getParameterList(funky)).toEqual(['hi', 'bye']);105 });106 it('function declaration', () => {107 function funky({ hi, bye }) {}108 expect(getParameterList(funky)).toEqual(['hi', 'bye']);109 });110 it('anonymous function expression', () => {111 const funky = function ({ hi, bye }) {};112 expect(getParameterList(funky)).toEqual(['hi', 'bye']);113 });114 it('named function expression', () => {115 const funky = function funk({ hi, bye }) {};116 expect(getParameterList(funky)).toEqual(['hi', 'bye']);117 });118 });119 describe('destructured parameters with defaults', () => {120 it('arrow', () => {121 const funky = ({ hi = 1, bye = '' }) => {};122 expect(getParameterList(funky)).toEqual(['hi', 'bye']);123 });124 it('function declaration', () => {125 function funky({ hi = 1, bye = '' }) {}126 expect(getParameterList(funky)).toEqual(['hi', 'bye']);127 });128 it('anonymous function expression', () => {129 const funky = function ({ hi = 1, bye = '' }) {};130 expect(getParameterList(funky)).toEqual(['hi', 'bye']);131 });132 it('named function expression', () => {133 const funky = function funk({ hi = 1, bye = '' }) {};134 expect(getParameterList(funky)).toEqual(['hi', 'bye']);135 });136 });137 describe('disasters', () => {138 it('arrow', () => {139 const funky = (a, { b, c = '' }, d = 3 + 2, ...e) => {};140 expect(getParameterList(funky)).toEqual(['a', 'b', 'c', 'd', 'e']);141 });142 it('function declaration', () => {143 function funky(a, { b, c = '' }, d = 3 + 2, ...e) {}144 expect(getParameterList(funky)).toEqual(['a', 'b', 'c', 'd', 'e']);145 });146 it('anonymous function expression', () => {147 const funky = function (a, { b, c = '' }, d = 3 + 2, ...e) {};148 expect(getParameterList(funky)).toEqual(['a', 'b', 'c', 'd', 'e']);149 });150 it('named function expression', () => {151 const funky = function funk(a, { b, c = '' }, d = 3 + 2, ...e) {};152 expect(getParameterList(funky)).toEqual(['a', 'b', 'c', 'd', 'e']);153 });154 });...

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 lisa 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