MCPcopy
hub / github.com/jestjs/jest / onNodeVersions

Function onNodeVersions

packages/test-utils/src/ConditionalTest.ts:63–77  ·  view source on GitHub ↗
(
  versionRange: string,
  testBody: () => void,
)

Source from the content-addressed store, hash-verified

61}
62
63export function onNodeVersions(
64 versionRange: string,
65 testBody: () => void,
66): void {
67 const description = `on node ${versionRange}`;
68 if (semver.satisfies(process.versions.node, versionRange)) {
69 describe(description, () => {
70 testBody();
71 });
72 } else {
73 describe.skip(description, () => {
74 testBody();
75 });
76 }
77}

Calls 1

describeFunction · 0.50

Tested by

no test coverage detected