-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kurt Medley
committed
May 25, 2024
1 parent
7ea79fc
commit c95ef1d
Showing
6 changed files
with
74 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { access, rm } from 'node:fs/promises'; | ||
import { resolve } from 'node:path'; | ||
import LoggerFactory from '../../logger.mjs'; | ||
import { Answer } from '../../types/index.mjs'; | ||
import { TemplateTypes } from '../../util.mjs'; | ||
import { createPackage } from '../../api.mjs'; | ||
|
||
const logger = LoggerFactory({ label: '/test/integration.test.mts' }); | ||
|
||
async function exists(filePath: string) { | ||
try { | ||
await access(filePath); | ||
return true; | ||
} catch (error) { | ||
return false; | ||
} | ||
} | ||
|
||
(async () => { | ||
const packageName = 'integration-test-vue'; | ||
const scaffoldedPath = resolve(process.cwd(), packageName); | ||
if (await exists(scaffoldedPath)) { | ||
logger.info(`Removing ${scaffoldedPath}`); | ||
await rm(scaffoldedPath, { recursive: true, force: true }); | ||
} | ||
|
||
const answers: Answer = { | ||
packageName, | ||
packageDescription: 'This is a test vue component', | ||
packageAuthor: 'rei', | ||
packageOwnerTeamId: 'testTeamId', | ||
packageTemplate: TemplateTypes.VUE, | ||
packageUsesDataDog: false, | ||
namespacedDir: true, | ||
}; | ||
|
||
logger.info(`Executing createPackage from integration test`); | ||
await createPackage({ answers, isInstall: false, isRun: false }); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters