Skip to content

Syntax errors are ignored #3401

@Richienb

Description

@Richienb

Config:

	"devDependencies": {
		"@sindresorhus/tsconfig": "^8.0.1",
		"ava": "^6.4.1",
		"del-cli": "^6.0.0",
		"time-span": "^5.1.0",
		"tsd": "^0.33.0",
		"tsimp": "^2.0.12",
		"typescript": "^5.9.2",
		"xo": "^1.2.2"
	},
	"ava": {
		"extensions": {
			"ts": "module"
		},
		"nodeArguments": [
			"--import=tsimp"
		]
	}

Code:

import test from 'ava';

test('sample', async t => {)
	t.pass()
});

Expected: SyntaxError

Actual:

  Uncaught exception in test.ts

  test.ts:155

   154: test('sample', async t => {)
   155:   t.pass()                  
   156: });                         

  ReferenceError: t is not defined

  › <anonymous> (test.ts:155:2)

  ✘ test.ts exited with a non-zero exit code: 1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions