# Getting started Functions ships with support for [Jest ↗](https://jestjs.io/) unit tests. Follow the steps in this guide to get unit testing tools set up for your repository. By default, functions includes a unit test located in the test file `functions-typescript/src/__tests__/index.ts`. You can create test files anywhere in the `__tests__` folder. ## Example For example, we may want to test the following function `addOne` in `functions-typescript/src/index.ts`: ```typescript import { Function, Integer } from "@foundry/functions-api"; export class MyFunctions { @Function() public addOne(n: Integer): Integer { return n + 1; } } ``` We can test the function `addOne` by writing the following test `test add one`: ```typescript import { MyFunctions } from ".." describe("example test suite", () => { const myFunctions = new MyFunctions(); test("test add one", () => { expect(myFunctions.addOne(42)).toEqual(43); }); }); ``` Refer to the [Jest API ↗](https://jestjs.io/docs/en/api) for details about the full testing API available to you. ## Running tests You can run all your tests by clicking on the `Test` button located on the top right, or run each individual test by clicking on the triangular "Play" button located beside the line number for each test. ![button-run-tests](../../../assets/c77868b37f6b98b0e8528e7d1c356be388fe59125a631fd4777bea1c6450b90f.webp) When you click **Commit**, all tests will also run in Checks: run-tests ## Next steps Next, learn about the range of options available for testing functions that interact with the Ontology: * [Create stub objects](../unit-test-stub-objects/index.md) * [Verify Ontology edits](../unit-test-ontology-edits/index.md) * [Stub Object searches and aggregations](../unit-test-object-searches/index.md)