MCPcopy Index your code
hub / github.com/dmno-dev/varlock / updateTests

Function updateTests

packages/env-spec-parser/test/stringify.test.ts:55–72  ·  view source on GitHub ↗
(
  tests: Record<string, {
    input: string;
    transform: (file: ParsedEnvSpecFile) => void;
    expected: string;
  }>,
)

Source from the content-addressed store, hash-verified

53]));
54
55function updateTests(
56 tests: Record<string, {
57 input: string;
58 transform: (file: ParsedEnvSpecFile) => void;
59 expected: string;
60 }>,
61) {
62 return () => {
63 Object.entries(tests).forEach(([label, spec]) => {
64 it(label, () => {
65 const result = parseEnvSpecDotEnvFile(spec.input);
66 spec.transform(result);
67 const outputStr = result.toString();
68 expect(outputStr).toEqual(spec.expected);
69 });
70 });
71 };
72}
73
74describe('update helpers', updateTests({
75 'add header': {

Callers 1

stringify.test.tsFile · 0.85

Calls 2

parseEnvSpecDotEnvFileFunction · 0.90
toStringMethod · 0.45

Tested by

no test coverage detected