nylo-testing

A testing guide for Nylo v7 Flutter apps. It covers tests for individual code units, user-interface widgets, network responses, sign-in states, time-dependent behavior, and app state.

In plain words
What is it for?
Use it to write, run, or debug unit and widget tests, mock API responses, simulate signed-in users, create fake data, and check routes, state changes, messages, or loading states.
Why use it?
It provides Nylo-specific test helpers so you do not have to build common test setup yourself. It also helps test behavior that depends on APIs, authentication, or time.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nylo-core/claude-code/nylo-testing
Any agent
npx skills add nylo-core/claude-code --skill nylo-testing
Clone the repo
git clone --depth 1 https://github.com/nylo-core/claude-code

Made for: Claude Code, Codex.

Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,768 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00049 $0.02768
Opus 5 $0.00024 $0.01384
Sonnet 5 $0.00010 $0.00554
Haiku 4.5 $0.00005 $0.00277

Measured yesterday against content hash 926b5454c294, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

nylo-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/nylo-testing/SKILL.md · 424 lines

How it starts

The opening of the file, as written. The whole thing — 424 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Nylo Testing

Overview

Nylo v7 provides a Laravel-inspired testing framework built on top of Flutter's test library. It includes helpers for widget testing, API mocking, authentication simulation, time manipulation, factories with fake data, and a rich set of custom assertions. Tests live in the test/ directory and use nyTest, nyWidgetTest, and nyGroup as entry points.

When to Use

  • Writing unit tests for models, services, or utility functions
  • Writing widget tests for NyPage or NyState-based pages
  • Mocking API responses for network-dependent tests
  • Simulating authenticated or guest users in tests
  • Testing time-sensitive logic with time travel helpers
  • Generating fake data with factories and NyFaker
  • Asserting routes, state updates, toast messages, or lock/loading states
  • When NOT to use: for standard Flutter widget tests that do not involve Nylo's state, routing, or API layers, use Flutter's built-in test utilities directly

Quick Reference

Task Code
Initialize test file NyTest.init() at top of test body
Unit test nyTest('name', () async { ... })
Widget test nyWidgetTest('name', (tester) async { ... })
Group tests nyGroup('name', () { ... })
Pump a NyPage await tester.pumpNyWidget(child: MyPage())
Pump and wait for init await tester.pumpNyWidgetAndWaitForInit(child: MyPage())
Mock API response NyMockApi.respond('/users', {'id': 1})
Simulate auth user NyTest.actingAs<User>(User(name: "Test"))
Travel to a time NyTest.travel(DateTime(2025, 6, 15))
Create factory model NyFactory.make<User>()
Fire state update fireStateUpdate('HomePageState', data: {...})
Debug test state NyTest.dump()

Test File Structure

import 'package:flutter_test/flutter_test.dart';
import 'package:nylo_framework/nylo_framework.dart';

void main() {
  NyTest.init();

  nySetUpAll(() async {
    // Runs once before all tests
  });

  nySetUp(() async {
    // Runs before each test
  });

  nyTearDown(() async {
    // Runs after each test
  });

  nyTearDownAll(() async {
    // Runs once after all tests
  });

  nyTest('my unit test', () async {
    expect(1 + 1, equals(2));
  });

  nyWidgetTest('my widget test', (tester) async {
    await tester.pumpNyWidget(child: MyPage());
    expect(find.text('Hello'), findsOneWidget);
  });

  nyGroup('user tests', () {
    nyTest('can create user', () async {
      // ...
    });
  });
}

Read the full file on GitHub · 424 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 424 lines · 49 tokens per session scan A 926b5454c294

Subscribe to this mod's changes

nylo-testing is a skill published in the GitHub repository nylo-core/claude-code (4 stars, last pushed 4mo ago), licensed MIT. It adds 49 tokens to every session and 2,768 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.