---
source: crates/oxc_linter/src/tester.rs
expression: valid_describe_callback
---
  ⚠ eslint(jest/valid-describe-callback): "Describe requires name and callback arguments"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe.each()()
   · ─────────────────
   ╰────
  help: "Add name as first argument and callback as second argument"

  ⚠ eslint(jest/valid-describe-callback): "Describe requires name and callback arguments"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe['each']()()
   · ────────────────────
   ╰────
  help: "Add name as first argument and callback as second argument"

  ⚠ eslint(jest/valid-describe-callback): "Describe requires name and callback arguments"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe.each(() => {})()
   · ─────────────────────────
   ╰────
  help: "Add name as first argument and callback as second argument"

  ⚠ eslint(jest/valid-describe-callback): "Describe requires name and callback arguments"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe.each(() => {})('foo')
   ·                         ─────
   ╰────
  help: "Add name as first argument and callback as second argument"

  ⚠ eslint(jest/valid-describe-callback): "Describe requires name and callback arguments"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe.each()(() => {})
   ·                 ────────
   ╰────
  help: "Add name as first argument and callback as second argument"

  ⚠ eslint(jest/valid-describe-callback): "Describe requires name and callback arguments"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe['each']()(() => {})
   ·                    ────────
   ╰────
  help: "Add name as first argument and callback as second argument"

  ⚠ eslint(jest/valid-describe-callback): "Describe requires name and callback arguments"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe.each('foo')(() => {})
   ·                      ────────
   ╰────
  help: "Add name as first argument and callback as second argument"

  ⚠ eslint(jest/valid-describe-callback): "Describe requires name and callback arguments"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe.only.each('foo')(() => {})
   ·                           ────────
   ╰────
  help: "Add name as first argument and callback as second argument"

  ⚠ eslint(jest/valid-describe-callback): "Describe requires name and callback arguments"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe(() => {})
   ·          ────────
   ╰────
  help: "Add name as first argument and callback as second argument"

  ⚠ eslint(jest/valid-describe-callback): "Describe requires name and callback arguments"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe('foo')
   ·          ─────
   ╰────
  help: "Add name as first argument and callback as second argument"

  ⚠ eslint(jest/valid-describe-callback): "Second argument must be a function"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe('foo', 'foo2')
   ·                 ──────
   ╰────
  help: "Replace second argument with a function"

  ⚠ eslint(jest/valid-describe-callback): "Describe requires name and callback arguments"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe()
   · ──────────
   ╰────
  help: "Add name as first argument and callback as second argument"

  ⚠ eslint(jest/valid-describe-callback): "No async describe callback"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe('foo', async () => {})
   ·                 ──────────────
   ╰────
  help: "Remove `async` keyword"

  ⚠ eslint(jest/valid-describe-callback): "No async describe callback"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe('foo', async function () {})
   ·                 ────────────────────
   ╰────
  help: "Remove `async` keyword"

  ⚠ eslint(jest/valid-describe-callback): "No async describe callback"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ xdescribe('foo', async function () {})
   ·                  ────────────────────
   ╰────
  help: "Remove `async` keyword"

  ⚠ eslint(jest/valid-describe-callback): "No async describe callback"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ fdescribe('foo', async function () {})
   ·                  ────────────────────
   ╰────
  help: "Remove `async` keyword"

  ⚠ eslint(jest/valid-describe-callback): "No async describe callback"
   ╭─[valid_describe_callback.tsx:2:1]
 2 │             import { fdescribe } from '@jest/globals';
 3 │             fdescribe('foo', async function () {})
   ·                              ────────────────────
 4 │             
   ╰────
  help: "Remove `async` keyword"

  ⚠ eslint(jest/valid-describe-callback): "No async describe callback"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe.only('foo', async function () {})
   ·                      ────────────────────
   ╰────
  help: "Remove `async` keyword"

  ⚠ eslint(jest/valid-describe-callback): "No async describe callback"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe.skip('foo', async function () {})
   ·                      ────────────────────
   ╰────
  help: "Remove `async` keyword"

  ⚠ eslint(jest/valid-describe-callback): "No async describe callback"
    ╭─[valid_describe_callback.tsx:5:1]
  5 │                     });
  6 │ ╭─▶                 describe('async', async () => {
  7 │ │                       await new Promise(setImmediate);
  8 │ │                       it('breaks', () => {
  9 │ │                           throw new Error('Fail');
 10 │ │                       });
 11 │ ╰─▶                 });
 12 │                 });
    ╰────
  help: "Remove `async` keyword"

  ⚠ eslint(jest/valid-describe-callback): "Unexpected return statement in describe callback"
   ╭─[valid_describe_callback.tsx:2:1]
 2 │                 describe('foo', function () {
 3 │ ╭─▶                 return Promise.resolve().then(() => {
 4 │ │                       it('breaks', () => {
 5 │ │                           throw new Error('Fail')
 6 │ │                       })
 7 │ ╰─▶                 })
 8 │                 })
   ╰────
  help: "Remove return statement in your describe callback"

  ⚠ eslint(jest/valid-describe-callback): "Unexpected return statement in describe callback"
   ╭─[valid_describe_callback.tsx:2:1]
 2 │                 describe('foo', () => {
 3 │ ╭─▶                 return Promise.resolve().then(() => {
 4 │ │                       it('breaks', () => {
 5 │ │                           throw new Error('Fail')
 6 │ │                       })
 7 │ ╰─▶                 })
 8 │                     describe('nested', () => {
   ╰────
  help: "Remove return statement in your describe callback"

  ⚠ eslint(jest/valid-describe-callback): "Unexpected return statement in describe callback"
    ╭─[valid_describe_callback.tsx:8:1]
  8 │                     describe('nested', () => {
  9 │ ╭─▶                     return Promise.resolve().then(() => {
 10 │ │                           it('breaks', () => {
 11 │ │                               throw new Error('Fail')
 12 │ │                           })
 13 │ ╰─▶                     })
 14 │                     })
    ╰────
  help: "Remove return statement in your describe callback"

  ⚠ eslint(jest/valid-describe-callback): "No async describe callback"
    ╭─[valid_describe_callback.tsx:1:1]
  1 │     
  2 │ ╭─▶             describe('foo', async () => {
  3 │ │                   await something()
  4 │ │                   it('does something')
  5 │ │                   describe('nested', () => {
  6 │ │                       return Promise.resolve().then(() => {
  7 │ │                           it('breaks', () => {
  8 │ │                               throw new Error('Fail')
  9 │ │                           })
 10 │ │                       })
 11 │ │                   })
 12 │ ╰─▶             })
 13 │                 
    ╰────
  help: "Remove `async` keyword"

  ⚠ eslint(jest/valid-describe-callback): "Unexpected return statement in describe callback"
    ╭─[valid_describe_callback.tsx:5:1]
  5 │                     describe('nested', () => {
  6 │ ╭─▶                     return Promise.resolve().then(() => {
  7 │ │                           it('breaks', () => {
  8 │ │                               throw new Error('Fail')
  9 │ │                           })
 10 │ ╰─▶                     })
 11 │                     })
    ╰────
  help: "Remove return statement in your describe callback"

  ⚠ eslint(jest/valid-describe-callback): "Unexpected return statement in describe callback"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe('foo', () => test('bar', () => {})) 
   ·                       ─────────────────────
   ╰────
  help: "Remove return statement in your describe callback"

  ⚠ eslint(jest/valid-describe-callback): "Unexpected argument(s) in describe callback"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe('foo', done => {})
   ·                 ──────────
   ╰────
  help: "Remove argument(s) of describe callback"

  ⚠ eslint(jest/valid-describe-callback): "Unexpected argument(s) in describe callback"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe('foo', function (done) {})
   ·                 ──────────────────
   ╰────
  help: "Remove argument(s) of describe callback"

  ⚠ eslint(jest/valid-describe-callback): "Unexpected argument(s) in describe callback"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe('foo', function (one, two, three) {})
   ·                 ─────────────────────────────
   ╰────
  help: "Remove argument(s) of describe callback"

  ⚠ eslint(jest/valid-describe-callback): "No async describe callback"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe('foo', async function (done) {})
   ·                 ────────────────────────
   ╰────
  help: "Remove `async` keyword"

  ⚠ eslint(jest/valid-describe-callback): "Unexpected argument(s) in describe callback"
   ╭─[valid_describe_callback.tsx:1:1]
 1 │ describe('foo', async function (done) {})
   ·                 ────────────────────────
   ╰────
  help: "Remove argument(s) of describe callback"


