Skip to content

Instantly share code, notes, and snippets.

@mcollina
Last active July 6, 2022 09:45
Show Gist options
  • Save mcollina/0eeed6a5d3d93fc225e5f7ee68a0d474 to your computer and use it in GitHub Desktop.
Save mcollina/0eeed6a5d3d93fc225e5f7ee68a0d474 to your computer and use it in GitHub Desktop.

Revisions

  1. mcollina revised this gist Jun 7, 2022. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions globals-jest-problem.test.js
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,7 @@ test('assert', () => {
    try {
    assert.strictEqual(2, 3)
    } catch (err) {
    // This will fail
    expect(err instanceof Error, true)
    }
    })
  2. mcollina revised this gist Jun 7, 2022. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions globals-jest-problem.test.js
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    // Run this with npx jest globals-jest-problem.test.js
    // This is because of https://github.com/facebook/jest/issues/2549

    const assert = require('assert')

    test('assert', () => {
  3. mcollina created this gist Jun 7, 2022.
    9 changes: 9 additions & 0 deletions globals-jest-problem.test.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    const assert = require('assert')

    test('assert', () => {
    try {
    assert.strictEqual(2, 3)
    } catch (err) {
    expect(err instanceof Error, true)
    }
    })