mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-18 15:55:30 +00:00
Adding extensive typing support Unified browser and Node.JS implementations Adding support of Gitlab API 16.0
17 lines
637 B
TypeScript
17 lines
637 B
TypeScript
import { promisify } from 'node:util';
|
|
import { exec } from 'node:child_process';
|
|
|
|
const execP = promisify(exec);
|
|
|
|
const { GITLAB_PERSONAL_ACCESS_TOKEN = '', GITLAB_URL = '', TEST_ID = Date.now() } = process.env;
|
|
|
|
describe('gitbeaker projects create', () => {
|
|
it('should create a valid project', async () => {
|
|
const command = `projects create --name="CLI Project - e2e ${TEST_ID}" --gb-token="${GITLAB_PERSONAL_ACCESS_TOKEN}" --gb-host="${GITLAB_URL}"`;
|
|
const { stdout } = await execP(`node dist/index.mjs ${command}`);
|
|
const { name } = JSON.parse(stdout);
|
|
|
|
expect(name).toBe(`CLI Project - e2e ${TEST_ID}`);
|
|
});
|
|
});
|