Skip to content

"Timed out while running tests" #2494

@fregante

Description

@fregante

I've been seeing more and more timeouts especially when running on GitHub Actions. I have very few and simple tests, so I'm not sure of why this times out so easily.

> @ ava /home/runner/work/refined-github/refined-github
> TS_NODE_FILES=true ava "--serial"

  ✖ Timed out while running tests

(node:3140) Warning: require() of ES modules is not supported.
require() of /home/runner/work/refined-github/refined-github/node_modules/select-dom/index.js from /home/runner/work/refined-github/refined-github/source/github-helpers/index.ts is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/runner/work/refined-github/refined-github/node_modules/select-dom/package.json.
  ✔ search-query.ts › .get
  ✔ search-query.ts › .getQueryParts
  ✔ search-query.ts › getQueryParts with spaces support
  ✔ search-query.ts › .set
  ✔ search-query.ts › .edit
  ✔ search-query.ts › .replace
  ✔ search-query.ts › .remove
  ✔ search-query.ts › .add
  ✔ search-query.ts › .includes
  ✔ search-query.ts › defaults

  9 tests passed
  1 known failure

  search-query.ts › getQueryParts with spaces support

Test file that times out: https://github.com/sindresorhus/refined-github/blob/master/test/helpers.ts
✅ Example run that completes: https://github.com/sindresorhus/refined-github/runs/695138978?check_suite_focus=true
❌ Example run that times out: https://github.com/sindresorhus/refined-github/runs/693030486?check_suite_focus=true

AVA 3.8.2
Node v12.16.3
{
	"ava": {
		"files": [
			"test/*.ts"
		],
		"extensions": [
			"ts"
		],
		"require": [
			"esm",
			"ts-node/register"
		]
	}
}

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