Skip to content

Commit a0cec66

Browse files
committed
test(cli): the agent-retirement pin's live-generator control asserts the ObjectSchema.create shape (#20270)
`generate-agent-retired.e2e.test.ts` asserted the pre-#20195 object template line `import * as Data from '@objectstack/spec/data'`, which the template stopped emitting in 0bd1126, so the nightly e2e tier was red on main. The control now asserts the template's current shape: `ObjectSchema` among the named imports from `@objectstack/spec/data`, and the `ObjectSchema.create({` call, not one exact import line. The case is neither skipped nor quarantined. Claude-Session: https://claude.ai/code/session_01UYBdGBzWSrAMzpW8ah3GbP Co-authored-by: Claude <noreply@anthropic.com>
1 parent cb9f98c commit a0cec66

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎packages/cli/test/generate-agent-retired.e2e.test.ts‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ describe('[#10359] the generators that were not retired still work', () => {
147147
it('`os g object … --dry-run` still previews a typed object file', () => {
148148
expect(survivor.code).toBe(0);
149149
expect(survivor.stdout).toContain('Dry run');
150-
expect(survivor.stdout).toContain("import * as Data from '@objectstack/spec/data'");
150+
// [#20270] The object template declares the object with
151+
// `ObjectSchema.create` since #20195 (0bd11261e). Asserted as that SHAPE —
152+
// `ObjectSchema` among the named imports from `@objectstack/spec/data`, and
153+
// the factory call — never as one exact import line: the copied
154+
// `import * as Data` line this replaced went stale when the template
155+
// changed, and turned this nightly case red on main.
156+
expect(survivor.stdout).toMatch(/import \{[^}]*\bObjectSchema\b[^}]*\} from '@objectstack\/spec\/data';/);
157+
expect(survivor.stdout).toMatch(/const customer = ObjectSchema\.create\(\{/);
151158
});
152159
});

0 commit comments

Comments
 (0)