Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 395 Bytes

test-script.md

File metadata and controls

42 lines (33 loc) · 395 Bytes

Enforces the use of tests

Enforces the use of the test script in package.json.

Fail

{
  "name": "foo"
}
{
  "name": "foo",
  "scripts": {
    "test": ""
  }
}
{
  "name": "foo",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  }
}

Pass

{
  "name": "foo",
  "scripts": {
    "test": "xo && ava"
  }
}