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',