From 6ab85e0e389a707b893f7a39c4ce798f57461755 Mon Sep 17 00:00:00 2001 From: blam Date: Mon, 22 Jun 2020 15:56:39 +0200 Subject: [PATCH] chore(scaffolder): added some more tests to check that the path is returned properly --- .../src/scaffolder/prepare/github.test.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/prepare/github.test.ts b/plugins/scaffolder-backend/src/scaffolder/prepare/github.test.ts index ecf39cca8e..44d53248d0 100644 --- a/plugins/scaffolder-backend/src/scaffolder/prepare/github.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/prepare/github.test.ts @@ -74,6 +74,12 @@ describe('GitHubPreparer', () => { { checkoutOpts: {} }, ); }); - it('resolves relative path from the template', async () => {}); - it('resolves relative path from the nested template', async () => {}); + + it('return the temp directory with the path to the folder if it is specified', async () => { + const preparer = new GithubPreparer(); + mockEntity.spec.path = './template/test/1/2/3'; + const response = await preparer.prepare(mockEntity); + + expect(response).toMatch(new RegExp(/\/template\/test\/1\/2\/3$/)); + }); });