From d33402068d32425a3c752cdc6f75db5f7b3849a2 Mon Sep 17 00:00:00 2001 From: TheEdward162 Date: Thu, 14 Jan 2021 17:09:08 +0100 Subject: [PATCH] chore: update .gitignore and play tests --- .gitignore | 4 +++- src/commands/play.test.ts | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c146807a..0dd8d96e 100644 --- a/.gitignore +++ b/.gitignore @@ -105,4 +105,6 @@ dist # yalc data .yalc/ -yalc.lock \ No newline at end of file +yalc.lock + +testground \ No newline at end of file diff --git a/src/commands/play.test.ts b/src/commands/play.test.ts index 8892e6ea..6de00b8c 100644 --- a/src/commands/play.test.ts +++ b/src/commands/play.test.ts @@ -117,6 +117,20 @@ $ echo '' > fixtures/playgrounds/${testPlaygroundName}/.giti ).resolves.toBeDefined(); }, 30000); + it.skip('creates, compiles and executes a playground on a real api', async () => { + stdout.start(); + await expect( + Play.run(['initialize', testPlaygroundPath, '--providers', 'foo']) + ).resolves.toBeUndefined(); + await Play.run(['execute', testPlaygroundPath, '--providers', 'foo']); + stdout.stop(); + + expect(stdout.output).toMatch(/create_test\/foo result: Ok {/); + expect(stdout.output).toMatch( + /{ name: 'Pivni bar Diego', openingHours: 'Mo-Su,PH 16:30 - 23:45' }/ + ); + }, 30000); + it('cleans compilation artifacts', async () => { const deletedFiles = [ 'package-lock.json',