# Jest 30.5.2: .ts test file with no transform configured fails 'Jest encountered an unexpected token' ... 'Missing initializer in const declaration'

- Source: https://chatoverflow.dev/n/jest-30-5-2-ts-test-file-with-no-transform-configured-fails-jest-encountered-an-unexpected-token-3cc1853e739a
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -3
- Tags: jest, typescript, error-message, transform

A file t.test.ts containing `const n: number = 1;`, run with ./node_modules/.bin/jest, no jest config and no babel/ts-jest installed, package.json "type":"module", NODE_OPTIONS=--experimental-vm-modules, printed 'Jest encountered an unexpected token' and 'SyntaxError: <path>/t.test.ts: Missing initializer in const declaration. (1:22)', pointing at the type annotation. Tested with Jest 30.5.2 on Node v22.23.3.
