Skip to content

Commit df31b8c

Browse files
committed
Update fixtures
1 parent 5e51fbb commit df31b8c

File tree

3 files changed

+33
-37
lines changed

3 files changed

+33
-37
lines changed

src/services/code-indexer/__fixtures__/indexFile.json

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.

src/services/code-indexer/__fixtures__/search.json

Lines changed: 22 additions & 22 deletions
Large diffs are not rendered by default.

src/services/code-indexer/__tests__/code-search.test.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@ describe("CodeSearch", () => {
1414
process.env.OPENAI_API_KEY = "fake"
1515

1616
nock.back.fixtures = path.join(__dirname, "..", "__fixtures__")
17-
nock.back.setMode("lockdown")
18-
1917
// You can re-record the fixtures by setting the mode to "record"
2018
// and running the tests with a real `OPENAI_API_KEY` in the environment.
21-
// if (nock.back.currentMode === "record") {
22-
// nock.enableNetConnect("api.openai.com")
23-
// }
19+
nock.back.setMode("lockdown")
2420
})
2521

2622
afterAll(() => {
@@ -60,8 +56,8 @@ describe("CodeSearch", () => {
6056

6157
expect(results[0]).toMatchObject({
6258
chunk: expect.stringContaining("testFunction()"),
63-
start: 79,
64-
end: 123,
59+
start: 73,
60+
end: 115,
6561
type: "function_declaration",
6662
filepath: expect.stringContaining("__fixtures__/test.ts"),
6763
})

0 commit comments

Comments
 (0)