<commit_before>{githubOpen, githubRepoUrl} = require '../lib/to-the-hubs'

describe "ToTheHubs", ->
  describe "githubRepoUrl(gitUrl)", ->
    it "returns the GitHub.com URL for an HTTP remote URL", ->
      url = githubRepoUrl("https://github.com/foo/bar.git")
      expect(url).toBe "https://github.com/foo/bar"

    it "returns the GitHub.com URL for an SSH remote URL", ->
      url = githubRepoUrl("git@github.com:foo/bar.git")
      expect(url).toBe "https://github.com/foo/bar"

    it "retuns undefined for a non-GitHub remote URL", ->
      url = githubRepoUrl("https://example.com/foo/bar.git")
      expect(url).toBeUndefined()<commit_msg>Update tests to reflect that #githubRepoUrl is an instance method<commit_after>GitHubFile = require '../lib/github-file'

describe "GitHubFile", ->
  describe "githubRepoUrl", ->
    githubFile = null

    beforeEach ->
      githubFile = new GitHubFile()

    it "returns the GitHub.com URL for an HTTP remote URL", ->
      githubFile.gitUrl = ->
        "https://github.com/foo/bar.git"

      expect(githubFile.githubRepoUrl()).toBe "https://github.com/foo/bar"

    it "returns the GitHub.com URL for an SSH remote URL", ->
      githubFile.gitUrl = ->
        "git@github.com:foo/bar.git"

      expect(githubFile.githubRepoUrl()).toBe "https://github.com/foo/bar"

    it "retuns undefined for a non-GitHub remote URL", ->
      githubFile.gitUrl = ->
        "https://example.com/foo/bar.git"

      expect(githubFile.githubRepoUrl()).toBeUndefined()
{'fraction_non_alphanumeric': 0.14920424403183025, 'fraction_numerical': 0.0, 'mean_word_length': 3.045576407506702, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2618292', 'n_tokens_mistral': 492, 'n_tokens_neox': 470, 'n_words': 107}