Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

run-tests

Skill by yagop

Explains how to run the unit and end-to-end test suites for the node-telegram-bot-api v2 repository. It is written for contributors who add or change Api or Bot methods.

  • Score 86
  • 9.2k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install run-tests

Built from the published package, never by AI.

git clone --depth 1 https://github.com/yagop/node-telegram-bot-api /tmp/node-telegram-bot-api && mkdir -p ~/.claude/skills && cp -r /tmp/node-telegram-bot-api/.claude/skills/run-tests ~/.claude/skills/run-tests

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install run-tests in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill is a guide to running the test suites in the node-telegram-bot-api v2 repository. It covers two suites: a unit suite in test/unit that injects a fake fetch and needs no network or token, and an end-to-end suite in test/e2e that calls the real api.telegram.org. It gives bun and node runner commands, shows how to scope a run to a single Bot API method with the -t flag, and describes the npm run check gate.

It also documents the e2e environment variables NODE_TELEGRAM_TOKEN, TEST_GROUP_ID and TEST_USER_ID, methods that need special chat conditions such as forum groups, and how to read DEBUG traces when requests hit flood limits or timeouts. It is aimed at contributors who add or change Api or Bot methods.

Written from the project's SKILL.md and checked against it.

What it can do

  • Run the unit suiteRuns test/unit with bun (npm test) or under node with tsx.
  • Run the e2e suiteRuns test/e2e against the real Telegram Bot API using bun.
  • Scope a run to one methodUses the -t pattern to run only the tests for a changed method.
  • Handle special chat conditionsExplains forum group and admin requirements for certain e2e methods.
  • Set up e2e credentialsDescribes the NODE_TELEGRAM_TOKEN, TEST_GROUP_ID and TEST_USER_ID variables.
  • Debug with DEBUG tracesShows how to print transport traces to tell flood limits from API errors.
  • Run the full local gateRuns npm run check, covering typecheck, lint, edge checks and the unit suite.
  • Check method coverageExplains the e2e guard that fails if an Api method has no describe block.

What you need

  • Bun (preferred) or Node.js
  • A Telegram bot token
  • A group the bot is an admin in (TEST_GROUP_ID)
  • A user id the bot can resolve in that group (TEST_USER_ID)
  • A forum-enabled supergroup for forum methods

Try asking

  • Run the unit tests for the transport module with bun
  • Run only the sendDice e2e test and show me any failures
  • Walk me through setting up the e2e env vars for my test group

Good to know

  • The e2e suite uses bun:test and cannot run under node.
  • The e2e suite has no skip-if-no-token guard, so it fails without valid credentials.
  • The e2e suite is slow and rate-limited to about 1 request per second.
  • Forum methods fail if TEST_GROUP_ID is not a forum-enabled supergroup.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .claude/skills/run-tests/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md9 KB

Alternatives to run-tests

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

run-tests: common questions

Can the e2e tests run under node?

No. The e2e suite imports bun:test, so it is bun-only. The unit suite also runs under node through tsx.

Will a full e2e run log the bot out?

No. The source says logOut, close and other bot-bricking methods are test.skip-ed, so a full run does not log the bot out.

Why do e2e tests fail when credentials are missing?

The e2e suite has no skip-if-no-token guard. Without valid credentials the real calls reject and the tests fail by design.

How do I install run-tests?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is run-tests free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is run-tests safe to use?

It scores 86 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to run-tests?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

run-tests Install

Add to stack

Loading.