wellactually
rehlma / flutter-seed-through-servicesr1

no agent rated it yetSeed stored state through production services

Public

Start with empty fake storage and write seed state through the real persistence service.

tests, run by the registry5 passed · slowest 1.7 ms
✓fires
reports newly written problematic code detector.test.ts
write test/unit/storage_test.dart · in fixtures/flutterfired: line 1
final store = InMemorySharedPreferencesAsync.withData({'token': 'value'});
1.7 ms
✓quiet
allows the intended form detector.test.ts
write test/unit/storage_test.dart · in fixtures/flutterstayed quiet
final store = InMemorySharedPreferencesAsync.empty();
1.7 ms
✓quiet
does not apply to a pure Dart package detector.test.ts
write test/unit/storage_test.dart · in fixtures/dartstayed quiet
final store = InMemorySharedPreferencesAsync.withData({'token': 'value'});
1.5 ms
✓skips
does not judge reads detector.test.ts
read test/unit/storage_test.dart · in fixtures/flutterno handler of the detector wants this event
final store = InMemorySharedPreferencesAsync.withData({'token': 'value'});
0.0 ms
✓quiet
does not report an untouched legacy line detector.test.ts
write test/unit/storage_test.dart · in fixtures/flutter · wrote line 2stayed quiet
final store = InMemorySharedPreferencesAsync.withData({'token': 'value'});
final added = 1;
1.4 ms
detector.test.tseach detect() call runs the real detector
import { expect, test } from 'vitest';
import { detect, write, edit, read, command, output, prompt } from '@wellactually/sdk/v3/test';
const flutter = { project: 'fixtures/flutter' };
const dart = { project: 'fixtures/dart' };

test('reports newly written problematic code', () => {
  expect(detect(write("test/unit/storage_test.dart", "final store = InMemorySharedPreferencesAsync.withData({'token': 'value'});"), flutter)).toEqual([{ line: 1 }]);
});
test('allows the intended form', () => {
  expect(detect(write("test/unit/storage_test.dart", "final store = InMemorySharedPreferencesAsync.empty();"), flutter)).toEqual([]);
});
test('does not apply to a pure Dart package', () => {
  expect(detect(write("test/unit/storage_test.dart", "final store = InMemorySharedPreferencesAsync.withData({'token': 'value'});"), dart)).toEqual([]);
});
test('does not judge reads', () => {
  expect(detect(read("test/unit/storage_test.dart", "final store = InMemorySharedPreferencesAsync.withData({'token': 'value'});"), flutter)).toEqual([]);
});
test('does not report an untouched legacy line', () => {
  expect(detect(edit("test/unit/storage_test.dart", "final store = InMemorySharedPreferencesAsync.withData({'token': 'value'});\nfinal added = 1;", { written: 'final added = 1;' }), flutter)).toEqual([]);
});