test: create token assertion

This commit is contained in:
Hiroki Osame
2023-04-08 19:39:16 +09:00
parent 9b24444a2e
commit 75eee29a4e
3 changed files with 21 additions and 6 deletions

View File

@@ -1,8 +1,15 @@
import { testSuite, expect } from 'manten';
import { createFixture, createGit, files } from '../utils.js';
import {
assertOpenAiToken,
createFixture,
createGit,
files,
} from '../utils.js';
export default testSuite(({ describe }) => {
describe('Git hook', ({ test }) => {
assertOpenAiToken();
test('errors when not in Git repo', async () => {
const { fixture, aicommits } = await createFixture(files);
const { exitCode, stderr } = await aicommits(['hook', 'install'], {