MCPcopy Index your code
hub / github.com/loopbackio/loopback-next / skipIf

Function skipIf

packages/testlab/src/skip.ts:36–47  ·  view source on GitHub ↗
(
  skip: boolean,
  verb: TestDefinition<ARGS, RETVAL> & {skip: TestDefinition<ARGS, RETVAL>},
  name: string,
  ...args: ARGS
)

Source from the content-addressed store, hash-verified

34 * implementing the test.
35 */
36export function skipIf<ARGS extends unknown[], RETVAL>(
37 skip: boolean,
38 verb: TestDefinition<ARGS, RETVAL> & {skip: TestDefinition<ARGS, RETVAL>},
39 name: string,
40 ...args: ARGS
41): RETVAL {
42 if (skip) {
43 return verb.skip(`[SKIPPED] ${name}`, ...args);
44 } else {
45 return verb(name, ...args);
46 }
47}
48
49/**
50 * Helper function for skipping tests on Travis CI.

Calls 1

skipMethod · 0.80

Tested by

no test coverage detected