npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tonconnect/qa

v1.0.0-alpha.0

Published

This guide provides a quick setup process for Playwright to automate tests for TON Dapps, note that this is a basic configuration

Readme

TON-Connect QA

This guide provides a quick setup process for Playwright to automate tests for TON Dapps, note that this is a basic configuration

Prerequisites

  • Node.js v18+
  • Playwright and TypeScript knowledge

Installation

  1. Install Playwright and its dependencies:
npm init playwright@latest

Follow the prompts to complete the installation

  1. Install dev dependency:
npm install --save-dev @tonconnect/qa

Setup

  1. Create or update your Playwright configuration file (e.g., playwright.config.ts):
import 'dotenv/config'
import { defineConfig, devices } from '@playwright/test'

// Define Playwright configuration
export default defineConfig({
 testDir: './test',
 fullyParallel: true,
 forbidOnly: !!process.env.CI,
 retries: process.env.CI ? 2 : 0,
 workers: process.env.CI ? 1 : undefined,
 reporter: 'html',
 use: {
   // Set base URL for tests
   baseURL: 'http://localhost:3000',
   trace: 'on-first-retry',
 },
 projects: [
   {
     name: 'chromium',
     use: { ...devices['Desktop Chrome'] },
   },
 ],
})
  1. Create a test file (e.g., tests/example.spec.ts):
// Import necessary modules and setup
import { TonConnectWidget, testWith, tonkeeperFixture } from '@tonconnect/qa'

// Create a test instance Tonkeeper fixtures
const test = testWith(tonkeeperFixture(process.env.WALLET_MNEMONIC!))

// Extract expect function from test
const { expect } = test

// Define a basic test case
test('lab', async ({ context, wallet }) => {
  // Navigate to the homepage
  const app = await context.newPage()
  await app.goto('https://ton-connect.github.io/demo-dapp-with-react-ui/')

  // Click the connect button
  const connectButton = app.getByRole('button', { name: 'Connect wallet to send the transaction' })

  // Connect Tonkeeper to the dapp
  const tonConnect = new TonConnectWidget(app, connectButton)
  await tonConnect.connectWallet('Tonkeeper')
  await wallet.connect()

  // Verify the connected account address
  const accountSelector = app.locator('div[data-tc-text]')
  await expect(accountSelector).toHaveText('0QAy…WfyR')

  // Sending transactions
  await app.getByRole('button', { name: 'Send transaction' }).click()
  await wallet.accept()
})

Running Tests

To run your Playwright tests with Tonkeeper:

  1. Start your local development server (if testing against a local app).

  2. Run the tests:

npx playwright test --config playwright-test.config.ts

This will execute your tests using Playwright with Tonkeeper integration

BDD

QA

Write scenarios in folder features see Gherkin Reference and Cucumber Anti-Patterns

SE

Describe step in folder steps

Develop

pnpm install
pnpm lint
pnpm format
pnpm playwright install
pnpm test # simple bdd test from features/*.feature
# for test with tonkeeper setup WALLET_MNEMONIC=".." in file .env
pnpm tonkeeper

Techstack

Release

pnpm release [--dry-run]

TODO research

  • https://www.browserstack.com/
    • https://vitalets.github.io/playwright-bdd/#/guides/usage-with-browserstack
  • https://saucelabs.com/
    • https://vitalets.github.io/playwright-bdd/#/guides/usage-with-saucelabs
  • https://nx.dev/
    • https://vitalets.github.io/playwright-bdd/#/guides/usage-with-nx
  • IDE integration
    • Intellij IDE / Aqua https://vitalets.github.io/playwright-bdd/#/guides/ide-integration?id=intellij-ide-aqua
    • VS Code https://vitalets.github.io/playwright-bdd/#/guides/ide-integration?id=vs-code