How to use t.notThrowsAsync method in ava

Best JavaScript code snippet using ava

composer.js

Source:composer.js Github

copy

Full Screen

...24 { type: 'poll', update: { poll: {} } },25]26topLevelUpdates.forEach((update) =>27 test('should route ' + update.type, (t) =>28 t.notThrowsAsync(29 new Promise((resolve) => {30 const bot = createBot()31 bot.on(update.type, () => resolve())32 bot.handleUpdate(update.update)33 })34 )35 )36)37test('should route many types', (t) =>38 t.notThrowsAsync(39 new Promise((resolve) => {40 const bot = createBot()41 bot.on(['chosen_inline_result', 'message'], () => resolve())42 bot.handleUpdate({ inline_query: baseMessage })43 bot.handleUpdate({ message: baseMessage })44 })45 ))46test('should route sub types', (t) =>47 t.notThrowsAsync(48 new Promise((resolve) => {49 const bot = createBot()50 bot.on('text', () => resolve())51 bot.handleUpdate({ message: { voice: {}, ...baseMessage } })52 bot.handleUpdate({ message: { text: 'hello', ...baseMessage } })53 })54 ))55topLevelUpdates.forEach((update) =>56 test('should guard ' + update.type, (t) =>57 t.notThrowsAsync(58 new Promise((resolve) => {59 const bot = createBot()60 bot.guard(61 (u) => update.type in u,62 () => resolve()63 )64 bot.handleUpdate(update.update)65 })66 )67 )68)69const updateTypes = [70 'voice',71 'video_note',72 'video',73 'animation',74 'venue',75 'text',76 'supergroup_chat_created',77 'successful_payment',78 'sticker',79 'pinned_message',80 'photo',81 'new_chat_title',82 'new_chat_photo',83 'new_chat_members',84 'migrate_to_chat_id',85 'migrate_from_chat_id',86 'location',87 'left_chat_member',88 'invoice',89 'group_chat_created',90 'game',91 'dice',92 'document',93 'delete_chat_photo',94 'contact',95 'channel_chat_created',96 'audio',97 'poll',98]99updateTypes.forEach((update) =>100 test('should route update type: ' + update, (t) =>101 t.notThrowsAsync(102 new Promise((resolve) => {103 const bot = createBot()104 bot.on(update, (ctx) => {105 resolve()106 })107 const message = { ...baseMessage }108 message[update] = {}109 bot.handleUpdate({ message: message })110 })111 )112 )113)114test('should route venue', (t) =>115 t.notThrowsAsync(116 new Promise((resolve) => {117 const bot = createBot()118 bot.on('venue', () => resolve())119 const message = {120 location: {},121 venue: { title: 'location', address: 'n/a' },122 ...baseMessage,123 }124 bot.handleUpdate({ message: message })125 })126 ))127test('should route location', (t) =>128 t.notThrowsAsync(129 new Promise((resolve) => {130 const bot = createBot()131 bot.on('venue', (ctx) => {132 resolve()133 })134 const message = {135 location: {},136 venue: { title: 'location', address: 'n/a' },137 ...baseMessage,138 }139 bot.handleUpdate({ message: message })140 })141 ))142test('should route forward_date', (t) =>143 t.notThrowsAsync(144 new Promise((resolve) => {145 const bot = createBot()146 bot.on('forward_date', (ctx) => {147 resolve()148 })149 const message = {150 forward_date: 1460829948,151 ...baseMessage,152 }153 bot.handleUpdate({ message: message })154 })155 ))156test('should throw error then called with undefined middleware', (t) =>157 t.throwsAsync(158 new Promise(() => {159 const composer = new Composer()160 composer.compose(() => undefined)161 })162 ))163test('should throw error then called with invalid middleware', (t) =>164 t.throwsAsync(165 new Promise(() => {166 const bot = createBot()167 bot.on('text', 'foo')168 })169 ))170test('should throw error then "next()" called twice', (t) =>171 t.notThrowsAsync(172 new Promise((resolve) => {173 const bot = createBot()174 bot.catch((e) => resolve())175 bot.use((ctx, next) => {176 next()177 return next()178 })179 bot.handleUpdate({ message: { text: 'hello', ...baseMessage } })180 })181 ))182test('should throw error then "next()" called with wrong context', (t) =>183 t.notThrowsAsync(184 new Promise((resolve, reject) => {185 const bot = createBot()186 bot.catch((e) => resolve())187 bot.use((ctx, next) => next('bad context'))188 bot.hears('hello', () => reject())189 bot.handleUpdate({ message: { text: 'hello', ...baseMessage } })190 })191 ))192test('should throw error then called with undefined trigger', (t) =>193 t.throwsAsync(194 new Promise((resolve) => {195 const bot = createBot()196 bot.hears(['foo', null])197 })198 ))199test('should support Composer instance as middleware', (t) =>200 t.notThrowsAsync(201 new Promise((resolve) => {202 const bot = createBot()203 const composer = new Composer()204 composer.on('text', (ctx) => {205 t.is('bar', ctx.state.foo)206 resolve()207 })208 bot.use(({ state }, next) => {209 state.foo = 'bar'210 return next()211 }, composer)212 bot.handleUpdate({ message: { text: 'hello', ...baseMessage } })213 })214 ))215test('should support Composer instance as handler', (t) =>216 t.notThrowsAsync(217 new Promise((resolve) => {218 const bot = createBot()219 const composer = new Composer()220 composer.on('text', () => resolve())221 bot.on('text', composer)222 bot.handleUpdate({ message: { text: 'hello', ...baseMessage } })223 })224 ))225test('should handle text triggers', (t) =>226 t.notThrowsAsync(227 new Promise((resolve) => {228 const bot = createBot()229 bot.hears('hello world', () => resolve())230 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })231 })232 ))233test('should handle fork', (t) =>234 t.notThrowsAsync(235 new Promise((resolve) => {236 const bot = createBot()237 bot.use(Telegraf.fork(() => resolve()))238 bot.handleUpdate({ message: { voice: {}, ...baseMessage } })239 })240 ))241test('Composer.branch should work with value', (t) =>242 t.notThrowsAsync(243 new Promise((resolve) => {244 const bot = createBot()245 bot.use(Composer.branch(true, () => resolve()))246 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })247 })248 ))249test('Composer.branch should work with fn', (t) =>250 t.notThrowsAsync(251 new Promise((resolve) => {252 const bot = createBot()253 bot.use(254 Composer.branch(255 (ctx) => false,256 null,257 () => resolve()258 )259 )260 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })261 })262 ))263test('Composer.branch should work with async fn', (t) =>264 t.notThrowsAsync(265 new Promise((resolve, reject) => {266 const bot = createBot()267 bot.use(268 Composer.branch(269 (ctx) => {270 return new Promise((resolve) => setTimeout(resolve, 100, false))271 },272 () => {273 reject()274 resolve()275 },276 () => resolve()277 )278 )279 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })280 })281 ))282test('Composer.acl should work with user id', (t) =>283 t.notThrowsAsync(284 new Promise((resolve) => {285 const bot = createBot()286 bot.use(Composer.acl(42, () => resolve()))287 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })288 })289 ))290test('Composer.acl should passthru', (t) =>291 t.notThrowsAsync(292 new Promise((resolve) => {293 const bot = createBot()294 bot.use(Composer.acl(42, Composer.passThru()))295 bot.use(() => resolve())296 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })297 })298 ))299test('Composer.acl should not be false positive', (t) =>300 t.notThrowsAsync(301 new Promise((resolve, reject) => {302 const bot = createBot()303 bot.use(Composer.acl(999, () => reject()))304 bot.use(() => resolve())305 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })306 })307 ))308test('Composer.acl should work with user ids', (t) =>309 t.notThrowsAsync(310 new Promise((resolve) => {311 const bot = createBot()312 bot.use(Composer.acl([42, 43], () => resolve()))313 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })314 })315 ))316test('Composer.acl should work with fn', (t) =>317 t.notThrowsAsync(318 new Promise((resolve) => {319 const bot = createBot()320 bot.use(321 Composer.acl(322 (ctx) => ctx.from.username === 'telegraf',323 () => resolve()324 )325 )326 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })327 })328 ))329test('Composer.acl should work with async fn', (t) =>330 t.notThrowsAsync(331 new Promise((resolve) => {332 const bot = createBot()333 bot.use(334 Composer.acl(335 (ctx) => new Promise((resolve) => setTimeout(resolve, 100, true)),336 () => resolve()337 )338 )339 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })340 })341 ))342test('Composer.optional should work with truthy value', (t) =>343 t.notThrowsAsync(344 new Promise((resolve) => {345 const bot = createBot()346 bot.use(Composer.optional(true, () => resolve()))347 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })348 })349 ))350test('Composer.optional should work with false value', (t) =>351 t.notThrowsAsync(352 new Promise((resolve, reject) => {353 const bot = createBot()354 bot.use(355 Composer.optional(false, () => {356 reject()357 resolve()358 })359 )360 bot.use(() => resolve())361 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })362 })363 ))364test('Composer.optional should work with fn', (t) =>365 t.notThrowsAsync(366 new Promise((resolve) => {367 const bot = createBot()368 bot.use(369 Composer.optional(370 (ctx) => true,371 () => resolve()372 )373 )374 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })375 })376 ))377test('Composer.optional should work with async fn', (t) =>378 t.notThrowsAsync(379 new Promise((resolve, reject) => {380 const bot = createBot()381 bot.use(382 Composer.optional(383 (ctx) => {384 return new Promise((resolve) => {385 setTimeout(() => {386 resolve(false)387 }, 100)388 })389 },390 () => {391 reject()392 resolve()393 }394 )395 )396 bot.use(() => resolve())397 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })398 })399 ))400test('Composer.filter should work with fn', (t) =>401 t.notThrowsAsync(402 new Promise((resolve) => {403 const bot = createBot()404 bot.filter(({ message }) => message.text.length < 2)405 bot.use(() => resolve())406 bot.handleUpdate({ message: { text: '-', ...baseMessage } })407 bot.handleUpdate({ message: { text: 'hello', ...baseMessage } })408 bot.handleUpdate({ message: { text: 'hello world ', ...baseMessage } })409 })410 ))411test('Composer.filter should work with async fn', (t) =>412 t.notThrowsAsync(413 new Promise((resolve) => {414 const bot = createBot()415 bot.filter(({ message }) => {416 return new Promise((resolve) => {417 setTimeout(() => {418 resolve(message.text.length < 2)419 }, 100)420 })421 })422 bot.use(() => resolve())423 bot.handleUpdate({ message: { text: '-', ...baseMessage } })424 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })425 })426 ))427test('Composer.drop should work with fn', (t) =>428 t.notThrowsAsync(429 new Promise((resolve) => {430 const bot = createBot()431 bot.drop(({ message }) => message.text.length > 2)432 bot.use(() => resolve())433 bot.handleUpdate({ message: { text: '-', ...baseMessage } })434 bot.handleUpdate({ message: { text: 'hello', ...baseMessage } })435 bot.handleUpdate({ message: { text: 'hello world ', ...baseMessage } })436 })437 ))438test('Composer.drop should work with async fn', (t) =>439 t.notThrowsAsync(440 new Promise((resolve) => {441 const bot = createBot()442 bot.drop(({ message }) => {443 return new Promise((resolve) => {444 setTimeout(() => {445 resolve(message.text.length > 2)446 }, 100)447 })448 })449 bot.use(() => resolve())450 bot.handleUpdate({ message: { text: '-', ...baseMessage } })451 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })452 })453 ))454test('Composer.lazy should work with fn', (t) =>455 t.notThrowsAsync(456 new Promise((resolve) => {457 const bot = createBot()458 bot.use(Composer.lazy((ctx) => () => resolve()))459 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })460 })461 ))462test('Composer.lazy should support middlewares', (t) =>463 t.notThrowsAsync(464 new Promise((resolve) => {465 const bot = createBot()466 bot.use(Composer.lazy((ctx) => (_, next) => next()))467 bot.use(() => resolve())468 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })469 })470 ))471test('Composer.dispatch should work with handlers array', (t) =>472 t.notThrowsAsync(473 new Promise((resolve, reject) => {474 const bot = createBot()475 bot.use(476 Composer.dispatch(() => 1, [477 () => {478 reject()479 resolve()480 },481 () => resolve(),482 ])483 )484 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })485 })486 ))487test('Composer.dispatch should work', (t) =>488 t.notThrowsAsync(489 new Promise((resolve) => {490 const bot = createBot()491 bot.use(492 Composer.dispatch(() => 'b', {493 b: () => resolve(),494 })495 )496 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })497 })498 ))499test('Composer.dispatch should work with async fn', (t) =>500 t.notThrowsAsync(501 new Promise((resolve, reject) => {502 const bot = createBot()503 bot.use(504 Composer.dispatch(505 (ctx) => {506 return new Promise((resolve) => {507 setTimeout(() => {508 resolve(1)509 }, 300)510 })511 },512 [513 () => {514 reject()515 resolve()516 },517 () => resolve(),518 ]519 )520 )521 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })522 })523 ))524test('Composer.log should just work', (t) =>525 t.notThrowsAsync(526 new Promise((resolve) => {527 const bot = createBot()528 bot.use(Composer.log(() => resolve()))529 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })530 })531 ))532test('Composer.entity should work', (t) =>533 t.notThrowsAsync(534 new Promise((resolve) => {535 const bot = createBot()536 bot.use(Composer.entity('hashtag', () => resolve()))537 bot.handleUpdate({538 message: {539 text: '#foo',540 entities: [{ type: 'hashtag', offset: 0, length: 4 }],541 },542 })543 })544 ))545test('Composer.entity should not infer', (t) =>546 t.notThrowsAsync(547 new Promise((resolve) => {548 const bot = createBot()549 bot.use(Composer.entity('command', () => resolve()))550 bot.use(() => resolve())551 bot.handleUpdate({552 message: {553 text: '#foo',554 entities: [{ type: 'hashtag', offset: 0, length: 4 }],555 },556 })557 })558 ))559test('Composer.entity should work with arrays', (t) =>560 t.notThrowsAsync(561 new Promise((resolve) => {562 const bot = createBot()563 bot.use(Composer.entity(['command', 'hashtag'], () => resolve()))564 bot.handleUpdate({565 message: {566 text: '#foo',567 entities: [{ type: 'hashtag', offset: 0, length: 4 }],568 },569 })570 })571 ))572test('Composer.entity should work with predicate', (t) =>573 t.notThrowsAsync(574 new Promise((resolve) => {575 const bot = createBot()576 bot.use(577 Composer.entity(578 (entity, value) => entity.type === 'hashtag' && value === '#foo',579 () => resolve()580 )581 )582 bot.handleUpdate({583 message: {584 text: '#foo',585 entities: [{ type: 'hashtag', offset: 0, length: 4 }],586 },587 })588 })589 ))590test('Composer.mention should work', (t) =>591 t.notThrowsAsync(592 new Promise((resolve) => {593 const bot = createBot()594 bot.use(Composer.mention(() => resolve()))595 bot.handleUpdate({596 message: {597 text: 'bar @foo',598 entities: [{ type: 'mention', offset: 4, length: 4 }],599 },600 })601 })602 ))603test('Composer.mention should work with pattern', (t) =>604 t.notThrowsAsync(605 new Promise((resolve) => {606 const bot = createBot()607 bot.use(Composer.mention('foo', () => resolve()))608 bot.handleUpdate({609 message: {610 text: 'bar @foo',611 entities: [{ type: 'mention', offset: 4, length: 4 }],612 },613 })614 })615 ))616test('Composer.hashtag should work', (t) =>617 t.notThrowsAsync(618 new Promise((resolve) => {619 const bot = createBot()620 bot.use(Composer.hashtag(() => resolve()))621 bot.handleUpdate({622 message: {623 text: '#foo',624 entities: [{ type: 'hashtag', offset: 0, length: 4 }],625 },626 })627 })628 ))629test('Composer.hashtag should work with pattern', (t) =>630 t.notThrowsAsync(631 new Promise((resolve) => {632 const bot = createBot()633 bot.use(Composer.hashtag('foo', () => resolve()))634 bot.handleUpdate({635 message: {636 text: 'bar #foo',637 entities: [{ type: 'hashtag', offset: 4, length: 4 }],638 },639 })640 })641 ))642test('Composer.hashtag should work with hash pattern', (t) =>643 t.notThrowsAsync(644 new Promise((resolve) => {645 const bot = createBot()646 bot.use(Composer.hashtag('#foo', () => resolve()))647 bot.handleUpdate({648 message: {649 text: 'bar #foo',650 entities: [{ type: 'hashtag', offset: 4, length: 4 }],651 },652 })653 })654 ))655test('Composer.hashtag should work with patterns array', (t) =>656 t.notThrowsAsync(657 new Promise((resolve) => {658 const bot = createBot()659 bot.use(Composer.hashtag(['news', 'foo'], () => resolve()))660 bot.handleUpdate({661 message: {662 text: 'bar #foo',663 entities: [{ type: 'hashtag', offset: 4, length: 4 }],664 },665 })666 })667 ))668test('should handle text triggers via functions', (t) =>669 t.notThrowsAsync(670 new Promise((resolve) => {671 const bot = createBot()672 bot.hears(673 (text) => text.startsWith('Hi'),674 () => resolve()675 )676 bot.handleUpdate({ message: { text: 'Hi there!', ...baseMessage } })677 })678 ))679test('should handle regex triggers', (t) =>680 t.notThrowsAsync(681 new Promise((resolve) => {682 const bot = createBot()683 bot.hears(/hello (.+)/, (ctx) => {684 t.is('world', ctx.match[1])685 resolve()686 })687 bot.handleUpdate({ message: { text: 'Ola!', ...baseMessage } })688 bot.handleUpdate({ message: { text: 'hello world', ...baseMessage } })689 })690 ))691test('should handle command', (t) =>692 t.notThrowsAsync(693 new Promise((resolve) => {694 const bot = createBot()695 bot.command('foo', () => resolve())696 bot.handleUpdate({697 message: {698 text: '/foo',699 entities: [{ type: 'bot_command', offset: 0, length: 4 }],700 ...baseMessage,701 },702 })703 })704 ))705test('should handle start command', (t) =>706 t.notThrowsAsync(707 new Promise((resolve) => {708 const bot = createBot()709 bot.start(() => resolve())710 bot.handleUpdate({711 message: {712 text: '/start',713 entities: [{ type: 'bot_command', offset: 0, length: 6 }],714 ...baseMessage,715 },716 })717 })718 ))719test('should handle help command', (t) =>720 t.notThrowsAsync(721 new Promise((resolve) => {722 const bot = createBot()723 bot.help(() => resolve())724 bot.handleUpdate({725 message: {726 text: '/help',727 entities: [{ type: 'bot_command', offset: 0, length: 5 }],728 ...baseMessage,729 },730 })731 })732 ))733test('should handle settings command', (t) =>734 t.notThrowsAsync(735 new Promise((resolve) => {736 const bot = createBot()737 bot.settings(() => resolve())738 bot.handleUpdate({739 message: {740 text: '/settings',741 entities: [{ type: 'bot_command', offset: 0, length: 9 }],742 ...baseMessage,743 },744 })745 })746 ))747test('should handle group command', (t) =>748 t.notThrowsAsync(749 new Promise((resolve) => {750 const bot = createBot(null)751 bot.botInfo = { username: 'bot' }752 bot.start(() => resolve())753 bot.handleUpdate({754 message: {755 text: '/start@bot',756 entities: [{ type: 'bot_command', offset: 0, length: 10 }],757 ...baseGroupMessage,758 },759 })760 })761 ))762test('should handle game query', (t) =>763 t.notThrowsAsync(764 new Promise((resolve) => {765 const bot = createBot()766 bot.gameQuery(() => resolve())767 bot.handleUpdate({ callback_query: { game_short_name: 'foo' } })768 })769 ))770test('should handle action', (t) =>771 t.notThrowsAsync(772 new Promise((resolve) => {773 const bot = createBot()774 bot.action('foo', () => resolve())775 bot.handleUpdate({ callback_query: { data: 'foo' } })776 })777 ))778test('should handle regex action', (t) =>779 t.notThrowsAsync(780 new Promise((resolve) => {781 const bot = createBot()782 bot.action(/foo (\d+)/, (ctx) => {783 t.true('match' in ctx)784 t.is('42', ctx.match[1])785 resolve()786 })787 bot.handleUpdate({ callback_query: { data: 'foo 42' } })788 })789 ))790test('should handle inline query', (t) =>791 t.notThrowsAsync(792 new Promise((resolve) => {793 const bot = createBot()794 bot.inlineQuery('foo', () => resolve())795 bot.handleUpdate({ inline_query: { query: 'foo' } })796 })797 ))798test('should handle regex inline query', (t) =>799 t.notThrowsAsync(800 new Promise((resolve) => {801 const bot = createBot()802 bot.inlineQuery(/foo (\d+)/, (ctx) => {803 t.true('match' in ctx)804 t.is('42', ctx.match[1])805 resolve()806 })807 bot.handleUpdate({ inline_query: { query: 'foo 42' } })808 })809 ))810test('should support middlewares', (t) =>811 t.notThrowsAsync(812 new Promise((resolve, reject) => {813 const bot = createBot()814 bot.action('bar', (ctx) => {815 reject()816 })817 bot.use(() => resolve())818 bot.handleUpdate({ callback_query: { data: 'foo' } })819 })820 ))821test('should handle short command', (t) =>822 t.notThrowsAsync(823 new Promise((resolve) => {824 const bot = createBot()825 bot.start(() => resolve())826 bot.handleUpdate({827 message: {828 text: '/start',829 entities: [{ type: 'bot_command', offset: 0, length: 6 }],830 ...baseMessage,831 },832 })833 })834 ))835test('should handle command in group', (t) =>836 t.notThrowsAsync(837 new Promise((resolve) => {838 const bot = createBot(null)839 bot.botInfo = { username: 'bot' }840 bot.start(() => resolve())841 bot.handleUpdate({842 message: {843 text: '/start@bot',844 entities: [{ type: 'bot_command', offset: 0, length: 10 }],845 chat: { id: 2, type: 'group' },846 },847 })848 })849 ))850test('should handle command in supergroup', (t) =>851 t.notThrowsAsync(852 new Promise((resolve) => {853 const bot = createBot(null)854 bot.botInfo = { username: 'bot' }855 bot.start(() => resolve())856 bot.handleUpdate({857 message: {858 text: '/start@bot',859 entities: [{ type: 'bot_command', offset: 0, length: 10 }],860 chat: { id: 2, type: 'supergroup' },861 },862 })863 })...

Full Screen

Full Screen

migration.test.js

Source:migration.test.js Github

copy

Full Screen

...47 await migration.uninstall()48 test.is(await migration.isInstalled(), false)49})50Test.serial('install()', (test) => {51 return test.notThrowsAsync((new NullMigration(Option)).install())52})53Test.serial('install() when reinstalled', async (test) => {54 let migration = new NullMigration(Option)55 await migration.install()56 return test.notThrowsAsync(migration.install())57 58})59Test.serial('uninstall()', async (test) => {60 return test.notThrowsAsync((new NullMigration(Option)).uninstall())61})62Test.serial('uninstall() when reuninstalled', async (test) => {63 let migration = new NullMigration(Option)64 await migration.install()65 await migration.uninstall()66 return test.notThrowsAsync(migration.uninstall())67})68Test.serial('createMigration(\'...\')', async (test) => {69 let name = `create-migration-for-${Path.basename(FilePath, Path.extname(FilePath)).replace('.test', '')}`70 await test.notThrowsAsync(async () => {71 72 let path = await Migration.createMigration(name)73 try {74 test.true(await FileSystem.pathExists(path))75 } finally {76 await FileSystem.remove(path)77 }78 })79})80Test.serial('getMigration({ ... })', (test) => {81 return test.notThrowsAsync(async () => {82 let migration = await Migration.getMigration(Option)83 // test.log(migration.map((item) => Path.relative('', item.path)))84 test.is(migration.length, 3)85 test.is(migration[0].name, '1638155586903-null')86 test.is(migration[1].name, '1638155600628-null')87 test.is(migration[2].name, '1638155612638-null')88 })89})90Test.serial('getMigration({ from: ... })', (test) => {91 return test.notThrowsAsync(async () => {92 let option = Configuration.getOption(Option, { 'include': { 'from': 1638155600628 } })93 let migration = await Migration.getMigration(option)94 // test.log(migration.map((item) => Path.relative('', item.path)))95 test.is(migration.length, 2)96 test.is(migration[0].name, '1638155600628-null')97 test.is(migration[1].name, '1638155612638-null')98 })99})100Test.serial('getMigration({ from: ..., to: ... })', (test) => {101 return test.notThrowsAsync(async () => {102 let option = Configuration.getOption(Option, { 'include': { 'from': 1638155600628, 'to': 1638155600628 } })103 let migration = await Migration.getMigration(option)104 // test.log(migration.map((item) => Path.relative('', item.path)))105 test.is(migration.length, 1)106 test.is(migration[0].name, '1638155600628-null')107 })108})109Test.serial('getMigration({ to: ... })', (test) => {110 return test.notThrowsAsync(async () => {111 let option = Configuration.getOption(Option, { 'include': { 'to': 1638155600628 } })112 let migration = await Migration.getMigration(option)113 // test.log(migration.map((item) => Path.relative('', item.path)))114 test.is(migration.length, 2)115 test.is(migration[0].name, '1638155586903-null')116 test.is(migration[1].name, '1638155600628-null')117 })118})119Test.serial('getMigration({ from: \'...\' })', (test) => {120 return test.notThrowsAsync(async () => {121 let option = Configuration.getOption(Option, { 'include': { 'from': Path.resolve(FolderPath, './migration-0/a/1638155600628-null.js') } })122 let migration = await Migration.getMigration(option)123 // test.log(migration.map((item) => Path.relative('', item.path)))124 test.is(migration.length, 2)125 test.is(migration[0].name, '1638155600628-null')126 test.is(migration[1].name, '1638155612638-null')127 })128})129Test.serial('getMigration({ from: \'...\', to: \'...\' })', (test) => {130 return test.notThrowsAsync(async () => {131 let option = Configuration.getOption(Option, { 'include': { 'from': Path.resolve(FolderPath, './migration-0/a/1638155600628-null.js'), 'to': Path.resolve(FolderPath, './migration-0/a/1638155600628-null.js') } })132 let migration = await Migration.getMigration(option)133 // test.log(migration.map((item) => Path.relative('', item.path)))134 test.is(migration.length, 1)135 test.is(migration[0].name, '1638155600628-null')136 })137})138Test.serial('getMigration({ to: \'...\' })', (test) => {139 return test.notThrowsAsync(async () => {140 let option = Configuration.getOption(Option, { 'include': { 'to': Path.resolve(FolderPath, './migration-0/a/1638155600628-null.js') } })141 let migration = await Migration.getMigration(option)142 // test.log(migration.map((item) => Path.relative('', item.path)))143 test.is(migration.length, 2)144 test.is(migration[0].name, '1638155586903-null')145 test.is(migration[1].name, '1638155600628-null')146 })147})148Test.serial('getMigration({ from: (non-migration), to: (non-migration) })', (test) => {149 return test.notThrowsAsync(async () => {150 let option = Configuration.getOption(Option, { 'include': { 'from': Path.resolve(FolderPath, '../../library/migration-0/template.js'), 'to': Path.resolve(FolderPath, '../../library/migration-0/template.js') } })151 let migration = await Migration.getMigration(option)152 // test.log(migration.map((item) => Path.relative('', item.path)))153 test.is(migration.length, 3)154 test.is(migration[0].name, '1638155586903-null')155 test.is(migration[1].name, '1638155600628-null')156 test.is(migration[2].name, '1638155612638-null')157 })158})159Test.serial('onMigration(( ... ) => { ... }, { ... })', (test) => {160 test.plan(4)161 return test.notThrowsAsync(Migration.onMigration(async (oneMigration, index, allMigration) => {162 test.is(oneMigration, allMigration[index])163 }, Option))164})165Test.serial('onNotInstalledMigration(( ... ) => { ... }, { ... }) when migrations are not installed', async (test) => {166 test.plan(4)167 return test.notThrowsAsync(Migration.onNotInstalledMigration(async (oneMigration, index, allMigration) => {168 test.is(oneMigration, allMigration[index])169 }, Option))170})171Test.serial('onNotInstalledMigration(( ... ) => { ... }, { ... }) when migrations are installed', async (test) => {172 await Migration.installMigration(Option)173 test.plan(1)174 return test.notThrowsAsync(Migration.onNotInstalledMigration(async (oneMigration, index, allMigration) => {175 test.is(oneMigration, allMigration[index])176 }, Option))177})178Test.serial('onNotInstalledMigration(( ... ) => { ... }, { ... }) when migrations are uninstalled', async (test) => {179 await Migration.installMigration(Option)180 await Migration.uninstallMigration(Option)181 test.plan(4)182 return test.notThrowsAsync(Migration.onNotInstalledMigration(async (oneMigration, index, allMigration) => {183 test.is(oneMigration, allMigration[index])184 }, Option))185})186Test.serial('onInstalledMigration(( ... ) => { ... }, { ... }) when migrations are not installed', async (test) => {187 test.plan(1)188 return test.notThrowsAsync(Migration.onInstalledMigration(async (oneMigration, index, allMigration) => {189 test.is(oneMigration, allMigration[index])190 }, Option))191})192Test.serial('onInstalledMigration(( ... ) => { ... }, { ... }) when migrations are installed', async (test) => {193 await Migration.installMigration(Option)194 test.plan(4)195 return test.notThrowsAsync(Migration.onInstalledMigration(async (oneMigration, index, allMigration) => {196 test.is(oneMigration, allMigration[index])197 }, Option))198})199Test.serial('onInstalledMigration(( ... ) => { ... }, { ... }) when migrations are uninstalled', async (test) => {200 await Migration.installMigration(Option)201 await Migration.uninstallMigration(Option)202 test.plan(1)203 return test.notThrowsAsync(Migration.onInstalledMigration(async (oneMigration, index, allMigration) => {204 test.is(oneMigration, allMigration[index])205 }, Option))206})207Test.serial('installMigration({ ... })', async (test) => {208 await test.notThrowsAsync(Migration.installMigration(Option))209 let migration = await Migration.getMigration(Option)210 test.is(migration.length, 3)211 test.is(await migration[0].isInstalled(), true)212 test.is(await migration[1].isInstalled(), true)213 test.is(await migration[2].isInstalled(), true)214})215// Test.serial('installMigration({ from: ... })', async (test) => {216// let option = Configuration.getOption(Option, { 'include': { 'from': 1638155600628 } })217// await test.notThrowsAsync(Migration.installMigration(option))218// let migration = await Migration.getMigration(Option)219// test.is(migration.length, 3)220// test.is(await migration[0].isInstalled(), false)221// test.is(await migration[1].isInstalled(), true)222// test.is(await migration[2].isInstalled(), true)223// })224// Test.serial('installMigration({ from: ..., to: ... })', async (test) => {225// let option = Configuration.getOption(Option, { 'include': { 'from': 1638155600628, 'to': 1638155600628 } })226// await test.notThrowsAsync(Migration.installMigration(option))227// let migration = await Migration.getMigration(Option)228// test.is(migration.length, 3)229// test.is(await migration[0].isInstalled(), false)230// test.is(await migration[1].isInstalled(), true)231// test.is(await migration[2].isInstalled(), false)232// })233// Test.serial('installMigration({ to: ... })', async (test) => {234// let option = Configuration.getOption(Option, { 'include': { 'to': 1638155600628 } })235// await test.notThrowsAsync(Migration.installMigration(option))236// let migration = await Migration.getMigration(Option)237// test.is(migration.length, 3)238// test.is(await migration[0].isInstalled(), true)239// test.is(await migration[1].isInstalled(), true)240// test.is(await migration[2].isInstalled(), false)241// })242// Test.serial('installMigration({ from: \'...\' })', async (test) => {243// let option = Configuration.getOption(Option, { 'include': { 'from': Path.resolve(FolderPath, './migration-0/a/1638155600628-null.js') } })244// await test.notThrowsAsync(Migration.installMigration(option))245// let migration = await Migration.getMigration(Option)246// test.is(migration.length, 3)247// test.is(await migration[0].isInstalled(), false)248// test.is(await migration[1].isInstalled(), true)249// test.is(await migration[2].isInstalled(), true)250// })251// Test.serial('installMigration({ from: \'...\', to: \'...\' })', async (test) => {252// let option = Configuration.getOption(Option, { 'include': { 'from': Path.resolve(FolderPath, './migration-0/a/1638155600628-null.js'), 'to': Path.resolve(FolderPath, './migration-0/a/1638155600628-null.js') } })253// await test.notThrowsAsync(Migration.installMigration(option))254// let migration = await Migration.getMigration(Option)255// test.is(migration.length, 3)256// test.is(await migration[0].isInstalled(), false)257// test.is(await migration[1].isInstalled(), true)258// test.is(await migration[2].isInstalled(), false)259// })260// Test.serial('installMigration({ to: \'...\' })', async (test) => {261// let option = Configuration.getOption(Option, { 'include': { 'to': Path.resolve(FolderPath, './migration-0/a/1638155600628-null.js') } })262// await test.notThrowsAsync(Migration.installMigration(option))263// let migration = await Migration.getMigration(Option)264// test.is(migration.length, 3)265// test.is(await migration[0].isInstalled(), true)266// test.is(await migration[1].isInstalled(), true)267// test.is(await migration[2].isInstalled(), false)268// })269Test.serial('uninstallMigration({ ... })', async (test) => {270 await Migration.installMigration(Option)271 await test.notThrowsAsync(Migration.uninstallMigration(Option))272 let migration = await Migration.getMigration(Option)273 test.is(migration.length, 3)274 test.is(await migration[0].isInstalled(), false)275 test.is(await migration[1].isInstalled(), false)276 test.is(await migration[2].isInstalled(), false)277})278// Test.serial('uninstallMigration({ from: ... })', async (test) => {279// await Migration.installMigration(Option)280 281// let option = Configuration.getOption(Option, { 'include': { 'from': 1638155600628 } })282// await test.notThrowsAsync(Migration.uninstallMigration(option))283// let migration = await Migration.getMigration(Option)284// test.is(migration.length, 3)285// test.is(await migration[0].isInstalled(), true)286// test.is(await migration[1].isInstalled(), false)287// test.is(await migration[2].isInstalled(), false)288// })289// Test.serial('uninstallMigration({ from: ..., to: ... })', async (test) => {290// await Migration.installMigration(Option)291// let option = Configuration.getOption(Option, { 'include': { 'from': 1638155600628, 'to': 1638155600628 } })292// await test.notThrowsAsync(Migration.uninstallMigration(option))293// let migration = await Migration.getMigration(Option)294// test.is(migration.length, 3)295// test.is(await migration[0].isInstalled(), true)296// test.is(await migration[1].isInstalled(), false)297// test.is(await migration[2].isInstalled(), true)298// })299// Test.serial('uninstallMigration({ to: ... })', async (test) => {300// await Migration.installMigration(Option)301// let option = Configuration.getOption(Option, { 'include': { 'to': 1638155600628 } })302// await test.notThrowsAsync(Migration.uninstallMigration(option))303// let migration = await Migration.getMigration(Option)304// test.is(migration.length, 3)305// test.is(await migration[0].isInstalled(), false)306// test.is(await migration[1].isInstalled(), false)307// test.is(await migration[2].isInstalled(), true)308// })309// Test.serial('uninstallMigration({ from: \'...\' })', async (test) => {310// await Migration.installMigration(Option)311// let option = Configuration.getOption(Option, { 'include': { 'from': Path.resolve(FolderPath, './migration-0/a/1638155600628-null.js') } })312// await test.notThrowsAsync(Migration.uninstallMigration(option))313// let migration = await Migration.getMigration(Option)314// test.is(migration.length, 3)315// test.is(await migration[0].isInstalled(), true)316// test.is(await migration[1].isInstalled(), false)317// test.is(await migration[2].isInstalled(), false)318// })319// Test.serial('uninstallMigration({ from: \'...\', to: \'...\' })', async (test) => {320// await Migration.installMigration(Option)321// let option = Configuration.getOption(Option, { 'include': { 'from': Path.resolve(FolderPath, './migration-0/a/1638155600628-null.js'), 'to': Path.resolve(FolderPath, './migration-0/a/1638155600628-null.js') } })322// await test.notThrowsAsync(Migration.uninstallMigration(option))323// let migration = await Migration.getMigration(Option)324// test.is(migration.length, 3)325// test.is(await migration[0].isInstalled(), true)326// test.is(await migration[1].isInstalled(), false)327// test.is(await migration[2].isInstalled(), true)328// })329// Test.serial('uninstallMigration({ to: \'...\' })', async (test) => {330// await Migration.installMigration(Option)331// let option = Configuration.getOption(Option, { 'include': { 'to': Path.resolve(FolderPath, './migration-0/a/1638155600628-null.js') } })332// await test.notThrowsAsync(Migration.uninstallMigration(option))333// let migration = await Migration.getMigration(Option)334// test.is(migration.length, 3)335// test.is(await migration[0].isInstalled(), false)336// test.is(await migration[1].isInstalled(), false)337// test.is(await migration[2].isInstalled(), true)...

Full Screen

Full Screen

cache.spec.js

Source:cache.spec.js Github

copy

Full Screen

...39 await t.context.cache.remove('store', 'key-not-exist');40 t.pass();41});42test('remove non-existent key', async t => {43 await t.notThrowsAsync(async () => await t.context.cache.remove('store', 'key-not-exist'));44});45test('remove val on non-existent store', async t => {46 await t.throwsAsync(async () => await t.context.cache.remove('store-not-exist', 'key'), Error);47});48test('illegal store name', async t => {49 await t.throwsAsync(async () => await createCache([ 'with spaces' ]), UnityCacheError);50});51test('does not throw on cache params', async t => {52 await t.notThrowsAsync(async () => await createCache([ 'store' ], 'test', 'test database', 'localStorageWrapper'));53});54test('drop store', async t => {55 await t.notThrowsAsync(async () => await t.context.cache.drop('drop_store'));56});57test('remove database', async t => {58 const cache = createCache([ 'store' ], 'test-1', 1);59 await t.notThrowsAsync(async () => await cache.remove());60});61test('upgrade handle', async t => {62 const cache = createCache([ 'store' ], 'test-2', 1);63 await cache.set('store', 'key', 'val');64 const newCache = createCache([ 'store', 'other' ], 'test-2', 1);65 await t.notThrowsAsync(async () => await newCache.set('store', 'key', 'val'));66 const newCachedVal = await newCache.get('store', 'key');67 t.is(newCachedVal, 'val');68});69test('upgrade handle when new higher version', async t => {70 const cache = createCache([ 'store' ], 'test-3', 1);71 await cache.set('store', 'key', 'val');72 await cache.remove();73 const newCache = createCache([ 'store', 'other' ], 'test-3', 2);74 await t.notThrowsAsync(async () => await newCache.set('store', 'key', 'val'));75 const newCacheValue = await cache.get('store', 'key');76 t.is(newCacheValue, 'val');77});78test('upgrade handle when new lower version', async t => {79 let cache;80 let cacheValue;81 cache = createCache([ 'store' ], 'test-4', 2);82 await cache.set('store', 'key', 'val');83 cache = createCache([ 'store', 'other' ], 'test-4', 1);84 await t.notThrowsAsync(async () => await cache.set('store', 'key', 'val'));85 cacheValue = await cache.get('store', 'key');86 t.is(cacheValue, null);87 await t.notThrowsAsync(async () => await cache.set('store', 'key', 'val'));88 cacheValue = await cache.get('store', 'key');89 t.is(cacheValue, 'val');...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const test = require('ava');2test('notThrowsAsync', async t => {3 await t.notThrowsAsync(Promise.resolve(1));4});5const test = require('ava');6test('notThrowsAsync', async t => {7 await t.notThrowsAsync(Promise.resolve(1));8});

Full Screen

Using AI Code Generation

copy

Full Screen

1import test from 'ava';2test('notThrowsAsync', async t => {3 const fixture = Promise.resolve('unicorn');4 await t.notThrowsAsync(fixture);5});6test('notThrowsAsync with function', async t => {7 const fixture = () => Promise.resolve('unicorn');8 await t.notThrowsAsync(fixture);9});10test('notThrowsAsync with arrow function', async t => {11 const fixture = async () => 'unicorn';12 await t.notThrowsAsync(fixture);13});14test('notThrowsAsync with function returning rejected promise', async t => {15 const fixture = () => Promise.reject(new Error('foo'));16 const error = await t.throwsAsync(fixture);17 t.is(error.message, 'foo');18});19test('notThrowsAsync with arrow function returning rejected promise', async t => {20 const fixture = async () => {21 throw new Error('foo');22 };23 const error = await t.throwsAsync(fixture);24 t.is(error.message, 'foo');25});26test('notThrowsAsync with function returning value', async t => {27 const fixture = () => 'unicorn';28 const error = await t.throwsAsync(fixture);29 t.is(error.message, 'Expected function to not throw, got \'unicorn\'');30});31test('notThrowsAsync with arrow function returning value', async t => {32 const fixture = async () => 'unicorn';33 const error = await t.throwsAsync(fixture);34 t.is(error.message, 'Expected function to not throw, got \'unicorn\'');35});36test('notThrowsAsync with function throwing synchronously', async t => {37 const fixture = () => {38 throw new Error('foo');39 };40 const error = await t.throwsAsync(fixture);41 t.is(error.message, 'foo');42});43test('notThrowsAsync with arrow function throwing synchronously', async t => {44 const fixture = () => {45 throw new Error('foo');46 };47 const error = await t.throwsAsync(fixture);48 t.is(error.message, 'foo');49});

Full Screen

Using AI Code Generation

copy

Full Screen

1const test = require('ava');2const delay = require('delay');3test('foo', async t => {4 await delay(200);5 t.pass();6});7const test = require('ava');8const delay = require('delay');9test('foo', async t => {10 await delay(200);11 t.fail();12});13const test = require('ava');14const delay = require('delay');15test('foo', async t => {16 await delay(200);17 t.pass();18});19const test = require('ava');20const delay = require('delay');21test('foo', async t => {22 await delay(200);23 t.fail();24});25const test = require('ava');26const delay = require('delay');27test('foo', async t => {28 await delay(200);29 t.pass();30});31const test = require('ava');32const delay = require('delay');33test('foo', async t => {34 await delay(200);35 t.fail();36});37const test = require('ava');38const delay = require('delay');39test('foo', async t => {40 await delay(200);41 t.pass();42});43const test = require('ava');44const delay = require('delay');45test('foo', async t => {46 await delay(200);47 t.fail();48});49const test = require('ava');50const delay = require('delay');51test('foo', async t => {52 await delay(200);53 t.pass();54});55const test = require('ava');56const delay = require('delay');57test('foo', async t => {58 await delay(200);59 t.fail();60});61const test = require('ava');62const delay = require('delay');63test('foo', async t => {64 await delay(200);65 t.pass();66});67const test = require('ava');68const delay = require('delay');69test('foo', async t => {70 await delay(

Full Screen

Using AI Code Generation

copy

Full Screen

1const test = require('ava');2test('notThrowsAsync', async t => {3 const fixture = Promise.resolve('unicorn');4 await t.notThrowsAsync(fixture);5});6const test = require('ava');7test('notThrowsAsync', async t => {8 const fixture = Promise.reject(new Error('foo'));9 const error = await t.throwsAsync(fixture);10 t.is(error.message, 'foo');11});12const test = require('ava');13test('notThrowsAsync', async t => {14 const fixture = Promise.reject(new Error('foo'));15 const error = await t.throwsAsync(fixture, Error);16 t.is(error.message, 'foo');17});18const test = require('ava');19test('notThrowsAsync', async t => {20 const fixture = Promise.reject(new Error('foo'));21 const error = await t.throwsAsync(fixture, 'foo');22 t.is(error.message, 'foo');23});24const test = require('ava');25test('notThrowsAsync', async t => {26 const fixture = Promise.reject(new Error('foo'));27 const error = await t.throwsAsync(fixture, {instanceOf: Error, message: 'foo'});28 t.is(error.message, 'foo');29});30const test = require('ava');31test('notThrowsAsync', async t => {32 const fixture = Promise.reject(new Error('foo'));33 const error = await t.throwsAsync(fixture, {instanceOf: Error, message: 'bar'});34 t.is(error.message, 'foo');35});36const test = require('ava');37test('notThrowsAsync', async t => {38 const fixture = Promise.reject(new Error('foo'));

Full Screen

Using AI Code Generation

copy

Full Screen

1const test = require('ava');2test('notThrowsAsync', async t => {3 await t.notThrowsAsync(Promise.resolve(1));4 await t.notThrowsAsync(Promise.reject(new Error('foo')));5});6### t.notThrowsAsync(fn, [message])7### t.throwsAsync(fn, [expected], [message])8### t.regex(contents, regex, [message])9### t.notRegex(contents, regex, [message])10### t.snapshot(value, [message])11### t.log([values], [...])12### t.fail([message])13### t.pass([message])14### t.skip([message])

Full Screen

Using AI Code Generation

copy

Full Screen

1const test = require('ava');2const Promise = require('bluebird');3const fs = Promise.promisifyAll(require('fs'));4const path = require('path');5const utils = require('util');6const exec = utils.promisify(require('child_process').exec);7test('test', async t => {8 const { stdout, stderr } = await exec('node test.js');9 t.notThrowsAsync(fs.readFileAsync(path.join(__dirname, 'test.js')));10});

Full Screen

Using AI Code Generation

copy

Full Screen

1import test from 'ava';2test('foo', t => {3 return t.notThrowsAsync(Promise.resolve());4});5#### t.throwsAsync(fn, [expected], [message])6import test from 'ava';7test('foo', async t => {8 await t.throwsAsync(Promise.reject(new Error('foo')));9 await t.throwsAsync(Promise.reject(new Error('foo')), 'foo');10 await t.throwsAsync(Promise.reject(new Error('foo')), Error);11 await t.throwsAsync(Promise.reject(new Error('foo')), /foo/);12 await t.throwsAsync(Promise.reject(new Error('foo')), err => err.message === 'foo');13});14#### t.notThrowsAsync(fn, [message])15import test from 'ava';16test('foo', async t => {17 await t.notThrowsAsync(Promise.resolve());18});19#### t.snapshot(value, [message])20import test from 'ava';21test('foo', t => {22 t.snapshot('foo');23});24#### t.snapshot.match(value, matcher, [message])

Full Screen

Using AI Code Generation

copy

Full Screen

1import test from 'ava';2import delay from 'delay';3import {fetchUser} from './fetchUser';4test('user exists', async t => {5 const user = await fetchUser();6 t.notThrowsAsync(delay(200));7 t.notThrowsAsync(delay(200), 'this will not throw');8 t.notThrowsAsync(delay(200), 'this will not throw', {timeout: 500});9});10export async function fetchUser() {11 return {12 };13}14#### t.regex(contents, regex, [message])15import test from 'ava';16test('matches', t => {17 t.regex('I love unicorns', /love/);18});19test('does not match', t => {20 t.throws(() => {21 t.regex('I love unicorns', /rainbows/);22 });23});24#### t.notRegex(contents, regex, [message])25import test from 'ava';26test('does not match', t => {27 t.notRegex('I love unicorns', /rainbows/);28});29test('matches', t => {30 t.throws(() => {31 t.notRegex('I love unicorns', /love/);32 });33});34#### t.ifError(error, [message])35import test from 'ava';36test.cb(t => {37 fs.readFile('data.txt', t.ifError);38});39import test from 'ava';40import fs from 'fs';41test('snapshot', t => {42 t.snapshot(fs.readFileSync('test.js', 'utf8'));43});

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