# JEST Modifiers

1. **<mark>Introduction</mark>**  
    In the Jest testing framework, "modifiers" refer to specific methods that change the behavior or scope of a test. These modifiers help in organizing and managing tests by allowing you to control when and how certain tests are run.  
    By using these modifiers, you can control the execution flow and organization of your tests, making your testing process more efficient and manageable.
    
2. **<mark>.only</mark>**  
    Use `.only` to run only the specified test or test suite. This is useful when you want to focus on a particular test without running the entire test suite.
    
    ```javascript
    test.only('this is the only test that will run', () => {
      expect(true).toBe(true);
    });
    
    describe.only('this is the only describe block that will run', () => {
      test('test within this describe block', () => {
        expect(true).toBe(true);
      });
    });
    ```
    
3. **<mark>.skip</mark>**  
    Use `.skip` to skip a particular test or test suite. This is useful when a test is not ready or temporarily disabled.
    
    ```javascript
    test.skip('this test will be skipped', () => {
      expect(true).toBe(true);
    });
    
    describe.skip('this describe block will be skipped', () => {
      test('test within this describe block', () => {
        expect(true).toBe(true);
      });
    });
    ```
    
4. **<mark>.todo</mark>**  
    Use `.todo` to mark a test as a "to-do". This indicates that the test is planned but not yet implemented.
    
    ```javascript
    test.todo('this is a test that needs to be written');
    ```
    
5. **<mark>.each</mark>**  
    Use `.each` to run the same test with different sets of data. This is useful for data-driven testing.
    
    ```javascript
    test.each([
      [1, 1, 2],
      [1, 2, 3],
      [2, 1, 3],
    ])('adds %i and %i to equal %i', (a, b, expected) => {
      expect(a + b).toBe(expected);
    });
    ```
    
6. **<mark>.concurrent</mark>**  
    Use `.concurrent` to run tests in parallel. This can speed up test execution by leveraging multiple CPU cores.
    
    ```javascript
    test.concurrent('this test will run concurrently', async () => {
      const result = await someAsyncFunction();
      expect(result).toBe(true);
    });
    ```
