Skip to content

Commit

Permalink
Add a unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
heatherlogan-scottlogic committed Aug 4, 2023
1 parent 5e60a7e commit 3fd63c9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions backend/test/unit/openai.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const { OpenAIApi } = require("openai");
const { setGptModel } = require("../../src/openai");

test("GIVEN a new model WHEN setting the GPT model THEN the model is set", () => {
const session = { gptModel: "gpt-4" };
const model = "gpt-3.5-turbo";
setGptModel(session, model);
expect(session.gptModel).toBe(model);
});

0 comments on commit 3fd63c9

Please sign in to comment.