MCPcopy Create free account
hub / github.com/ReactiveX/rxjs / localSpecOutputName

Function localSpecOutputName

packages/migrate/src/node.ts:48–53  ·  view source on GitHub ↗
({ sourcePath, sourceRoot, mode })

Source from the content-addressed store, hash-verified

46}
47
48export const localSpecOutputName: OutputNamePolicy = ({ sourcePath, sourceRoot, mode }) => {
49 const localPath = relative(sourceRoot, sourcePath).replaceAll('\\', '/');
50 const extension = extname(localPath);
51 const stem = (extension ? localPath.slice(0, -extension.length) : localPath).replace(/-spec$/, '');
52 return `${stem}.${mode}.spec.ts`;
53};
54
55/**
56 * Resolves, validates, reads, and transforms an entire migration batch without

Callers 2

usage.tsFile · 0.90
node.spec.tsFile · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected