Skip to content
This repository was archived by the owner on Aug 22, 2022. It is now read-only.
This repository was archived by the owner on Aug 22, 2022. It is now read-only.

Failing 'throws' assertion not properly reported #8

@christopheraue

Description

@christopheraue

Instead of showing the reason for the failing assertion (e.g. a message mismatch) it shows (unknown operator: throws)

Test file:

// error.js
export default ({test}) => {
  test('failing throws assertion', t => {
    t.throws(() => { throw new Error('message') }, /another message/)
  })
}

Output:

$ yarn pta error.js 
yarn run v1.21.1
$ /mnt/shared/projects/node_modules/lgt/node_modules/.bin/pta error.js

 TESTS FILES

  ✖    0/1  /error.js

 FAILURES

1. failing throws assertion > should throw <-- [ throws ]
    at /mnt/shared/projects/node_modules/lgt/error.js:3:7

    (unknown operator: throws)
____________________________________________________________________________________________________________________________________________________________________________________________________________________________________

 SUMMARY

 ✔ PASS: 0
 ⚠ SKIP: 0
 ✔ FAIL: 1


error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions