Skip to content

Commit

Permalink
test: update expectation strings
Browse files Browse the repository at this point in the history
  • Loading branch information
blgm committed Sep 4, 2020
1 parent 3d0cb2e commit a087b21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/jfq_inputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ describe('inputs', () => {
const res = await runStdin(input)
expect(res.stderr).toBeNull()
expect(res.stdout).toBeNull()
expect(res.error.message).toContain('Unexpected token b in JSON at position 8 while parsing near \'{"foo": bar\'')
expect(res.error.message).toContain('Unexpected token "b" (0x62) in JSON at position 8 while parsing "{\\"foo\\": bar\\n"')
})

it('reports the position and file name for files', async () => {
const res = await run('$', 'src/__tests__/fixtures/bad.json')
expect(res.stderr).toBeNull()
expect(res.stdout).toBeNull()
expect(res.error.message).toContain("Unexpected token f in JSON at position 4 while parsing near '{ foo: 42}' in src/__tests__/fixtures/bad.json")
expect(res.error.message).toContain('Unexpected token "f" (0x66) in JSON at position 4 while parsing "{\\n foo: 42\\n}\\n" in src/__tests__/fixtures/bad.json')
})
})

Expand Down

0 comments on commit a087b21

Please sign in to comment.