---
lang: en
title: 'API docs: testlab.skipif'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
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.

<b>Signature:</b>

```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

|  Parameter | Type | Description |
|  --- | --- | --- |
|  skip | <code>boolean</code> | Should the test case/suite be skipped? |
|  verb | <code>TestDefinition&lt;ARGS, RETVAL&gt; &amp; {</code><br/><code>    skip: TestDefinition&lt;ARGS, RETVAL&gt;;</code><br/><code>}</code> | The function to invoke to define the test case or the test suite, e.g. <code>it</code> or <code>describe</code>. |
|  name | <code>string</code> | The test name (the first argument of <code>verb</code> function). |
|  args | <code>ARGS</code> | Additional arguments (framework specific), typically a function implementing the test. |

<b>Returns:</b>

`RETVAL`

## Example


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

```


