feat: use new gpt-3.5-turbo model (#123)
Co-authored-by: Hiroki Osame <hiroki.osame@gmail.com>
This commit is contained in:
@@ -3,9 +3,6 @@ import { createFixture } from 'fs-fixture';
|
||||
import { createAicommits, createGit } from '../utils.js';
|
||||
|
||||
const { OPENAI_KEY } = process.env;
|
||||
if (!OPENAI_KEY) {
|
||||
throw new Error('process.env.OPENAI_KEY is necessary to run these tests');
|
||||
}
|
||||
|
||||
export default testSuite(({ describe }) => {
|
||||
if (process.platform === 'win32') {
|
||||
@@ -14,6 +11,11 @@ export default testSuite(({ describe }) => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!OPENAI_KEY) {
|
||||
console.warn('⚠️ process.env.OPENAI_KEY is necessary to run these tests. Skipping...');
|
||||
return;
|
||||
}
|
||||
|
||||
describe('CLI', async ({ test }) => {
|
||||
const data: Record<string, string> = {
|
||||
firstName: 'Hiroki',
|
||||
@@ -94,10 +96,8 @@ export default testSuite(({ describe }) => {
|
||||
if (stdout.match('└')) {
|
||||
const countChoices = stdout.match(/ {2}[●○]/g)?.length ?? 0;
|
||||
|
||||
// 2 choices or less should be generated
|
||||
// pretty common for it to return 2 results that are the same
|
||||
// which gets de-duplicated
|
||||
expect(countChoices <= 2).toBe(true);
|
||||
// 2 choices should be generated
|
||||
expect(countChoices).toBe(2);
|
||||
|
||||
committing.stdin!.write('\r');
|
||||
committing.stdin!.end();
|
||||
|
||||
Reference in New Issue
Block a user