---
lang: en
title: 'API docs: testlab.skipif'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/testlab
permalink: /doc/en/lb4/apidocs.testlab.skipif.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/testlab](./testlab.md) &gt; [skipIf](./testlab.skipif.md)

## skipIf() function

Helper function for skipping tests when a certain condition is met.

**Signature:**

```typescript
export declare function skipIf<ARGS extends unknown[], RETVAL>(skip: boolean, verb: TestDefinition<ARGS, RETVAL> & {
    skip: TestDefinition<ARGS, RETVAL>;
}, name: string, ...args: ARGS): RETVAL;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

skip


</td><td>

boolean


</td><td>

Should the test case/suite be skipped?


</td></tr>
<tr><td>

verb


</td><td>

[TestDefinition](./testlab.testdefinition.md)<!-- -->&lt;ARGS, RETVAL&gt; &amp; { skip: [TestDefinition](./testlab.testdefinition.md)<!-- -->&lt;ARGS, RETVAL&gt;; }


</td><td>

The function to invoke to define the test case or the test suite, e.g. `it` or `describe`<!-- -->.


</td></tr>
<tr><td>

name


</td><td>

string


</td><td>

The test name (the first argument of `verb` function).


</td></tr>
<tr><td>

args


</td><td>

ARGS


</td><td>

Additional arguments (framework specific), typically a function implementing the test.


</td></tr>
</tbody></table>

**Returns:**

RETVAL

## Example


```ts
skipIf(
  !features.freeFormProperties,
  describe,
 'free-form properties (strict: false)',
  () => {
    // the tests
  }
);
```


