MCPcopy Index your code
hub / github.com/bitjson/typescript-starter / pretendLatestVersionIs

Function pretendLatestVersionIs

src/cli/tests/cli.unit.spec.ts:35–48  ·  view source on GitHub ↗
(version: string)

Source from the content-addressed store, hash-verified

33});
34
35const pretendLatestVersionIs = (version: string) => {
36 nock.disableNetConnect();
37 nock('https://registry.npmjs.org:443')
38 .get('/typescript-starter')
39 .reply(200, {
40 'dist-tags': { latest: version },
41 name: 'typescript-starter',
42 versions: {
43 [version]: {
44 version,
45 },
46 },
47 });
48};
49
50test("doesn't error if not outdated", async (t) => {
51 const currentVersion = meow('').pkg.version as string;

Callers 1

cli.unit.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected