test: create token assertion
This commit is contained in:
@@ -77,3 +77,9 @@ export const files = Object.freeze({
|
||||
'.aicommits': `OPENAI_KEY=${process.env.OPENAI_KEY}`,
|
||||
'data.json': 'Lorem ipsum dolor sit amet '.repeat(10),
|
||||
});
|
||||
|
||||
export const assertOpenAiToken = () => {
|
||||
if (!process.env.OPENAI_KEY) {
|
||||
throw new Error('⚠️ process.env.OPENAI_KEY is necessary to run these tests. Skipping...');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user