<commit_before>import { isMutation, getGraphQLServer } from "./useApolloClient"

describe("isMutation function", () => {
  it("should return true for mutation", () => {
    expect(isMutation("CreateContent")).toBeTruthy()
  })
  it("should return false for query", () => {
    expect(isMutation("GetRefreshToken")).toBeFalsy()
  })
})

describe("getGraphQLServer function", () => {
  const OLD_ENV = process.env

  beforeEach(() => {
    jest.resetModules() // clear the cache
    process.env = { ...OLD_ENV } // make a copy
  })

  afterAll(() => {
    process.env = OLD_ENV // restore old env
  })<commit_msg>test: use correct mutation name in test<commit_after>import { isMutation, getGraphQLServer } from "./useApolloClient"

describe("isMutation function", () => {
  it("should return true for mutation", () => {
    expect(isMutation("Logout")).toBeTruthy()
  })
  it("should return false for query", () => {
    expect(isMutation("GetRefreshToken")).toBeFalsy()
  })
})

describe("getGraphQLServer function", () => {
  const OLD_ENV = process.env

  beforeEach(() => {
    jest.resetModules() // clear the cache
    process.env = { ...OLD_ENV } // make a copy
  })

  afterAll(() => {
    process.env = OLD_ENV // restore old env
  })
{'fraction_non_alphanumeric': 0.1716357775987107, 'fraction_numerical': 0.0, 'mean_word_length': 3.6867924528301885, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3618724', 'n_tokens_mistral': 405, 'n_tokens_neox': 393, 'n_words': 86}