mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-05 08:23:59 +01:00
test(pregate): init draft API is exercised directly, so init-draft.ts has a lane
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
2084712c04
commit
f73278112b
1 file changed
+4
@@ -15,6 +15,7 @@ import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import { EXIT } from '../lib/headless-artifacts';
|
||||
import { referencesIn } from '../lib/pregate/import-graph';
|
||||
import { describeDraft, draftConfig } from '../lib/pregate/init-draft';
|
||||
import { parseWorkflow } from '../lib/pregate/workflows';
|
||||
import { cleanup, commit, makeFixtureRepo, runBin, type FixtureRepo } from './helpers/pregate-fixture';
|
||||
|
||||
@@ -181,6 +182,9 @@ describe('gstack-pregate init drafts a policy from the repo (#3268)', () => {
|
||||
expect(draft.dependencies['lib/util.js']).toBeUndefined();
|
||||
expect(draft.dependencies['lib/retry.js']).toBeUndefined();
|
||||
expect(r.out).toContain('TODO selection: windows.yml/windows-shard computes its matrix');
|
||||
const direct = draftConfig(repo.work);
|
||||
expect(direct.todo).toContain('lib/orphan.js');
|
||||
expect(describeDraft(direct)).toContain('TODO lib/orphan.js: no test lane and no nearby test; add a test, map it under dependencies, or declare [] if no test can cover it');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user