<commit_before>require "language/node"

class Jsdoc3 < Formula
  desc "API documentation generator for JavaScript"
  homepage "http://usejsdoc.org/"
  url "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.2.tgz"
  sha256 "8544c5087203111249cd15b9576ee4d95d7d7e371e7b47bd89963da9e2895ed8"
  head "https://github.com/jsdoc3/jsdoc.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "2090e24d6b5bb91b5179e036e89105f4d6975d254284ebf7ff5642cf07990c9c" => :sierra
    sha256 "71549c405186b6230a9145dc10527e530852703d673abae0a127e4643352fc7d" => :el_capitan
    sha256 "4ac032304137e81860a4ea5aecbe62314f8f9c075f6697b26e881225b34f51b9" => :yosemite
  end

  depends_on "node"

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    (testpath/"test.js").write <<-EOS.undent
      /**
       * Represents a formula.
       * @constructor<commit_msg>jsdoc3: update 3.5.2 bottle for Linuxbrew.<commit_after>require "language/node"

class Jsdoc3 < Formula
  desc "API documentation generator for JavaScript"
  homepage "http://usejsdoc.org/"
  url "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.2.tgz"
  sha256 "8544c5087203111249cd15b9576ee4d95d7d7e371e7b47bd89963da9e2895ed8"
  head "https://github.com/jsdoc3/jsdoc.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "2090e24d6b5bb91b5179e036e89105f4d6975d254284ebf7ff5642cf07990c9c" => :sierra
    sha256 "71549c405186b6230a9145dc10527e530852703d673abae0a127e4643352fc7d" => :el_capitan
    sha256 "4ac032304137e81860a4ea5aecbe62314f8f9c075f6697b26e881225b34f51b9" => :yosemite
    sha256 "b5c912034b3d76959617332e5bc2ebbb2781a2c1860100cf88553e510810e11f" => :x86_64_linux
  end

  depends_on "node"

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    (testpath/"test.js").write <<-EOS.undent
      /**
       * Represents a formula.
       * @constructor
{'fraction_non_alphanumeric': 0.10445544554455445, 'fraction_numerical': 0.22425742574257426, 'mean_word_length': 4.7578347578347575, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 4, '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': '1499305', 'n_tokens_mistral': 1097, 'n_tokens_neox': 858, 'n_words': 111}