Skip to content
This repository has been archived by the owner on Mar 29, 2020. It is now read-only.

Replace assert.deep*Equal with expect().toEqual() #111

Open
Leko opened this issue Aug 13, 2018 · 0 comments
Open

Replace assert.deep*Equal with expect().toEqual() #111

Leko opened this issue Aug 13, 2018 · 0 comments
Assignees
Labels

Comments

@Leko
Copy link
Owner

Leko commented Aug 13, 2018

Overview

assert.deep*Equal does not print diff perfectly in jest.
It's not convenient for a developer when the test is failed.

Actual behavior

Use assert.deepStrictEqual(actual, expected)

  ● YarnWorkspaces#getPackages should return package when lockfile exists

    AssertionError [ERR_ASSERTION]: [ '/Users/leko/.ghq/github.com/Leko/hothouse/packages/@hothouse/monorepo-yarn-workspaces/__tests__/fixtures/has-yarn-workspaces- deepStrictEqual [ '/Users/leko/.ghq/github.com/Leko/hothouse/packages/@hothouse/monorepo-yarn-workspaces/__tests__/fixtures/has-yarn-workspaces-

Expected behavior

Use expect(expected).toEqual(actual)

  ● Lerna#getPackages should include top-level package.json

    expect(received).toEqual(expected)

    Expected value to equal:
      ["/Users/leko/.ghq/github.com/Leko/hothouse/packages/@hothouse/monorepo-yarn-workspaces/__tests__/fixtures/has-yarn-workspaces-with-lockfile/packages/child-a"]
    Received:
      ["/Users/leko/.ghq/github.com/Leko/hothouse/packages/@hothouse/monorepo-yarn-workspaces/__tests__/fixtures/has-yarn-workspaces-with-lockfile", "/Users/leko/.ghq/github.com/Leko/hothouse/packages/@hothouse/monorepo-yarn-workspaces/__tests__/fixtures/has-yarn-workspaces-with-lockfile/packages/child-a"]

    Difference:

    - Expected
    + Received

      Array [
    +   "/Users/leko/.ghq/github.com/Leko/hothouse/packages/@hothouse/monorepo-yarn-workspaces/__tests__/fixtures/has-yarn-workspaces-with-lockfile",
        "/Users/leko/.ghq/github.com/Leko/hothouse/packages/@hothouse/monorepo-yarn-workspaces/__tests__/fixtures/has-yarn-workspaces-with-lockfile/packages/child-a",
      ]
@Leko Leko self-assigned this Aug 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant