Skip to content

Improve distribution tests #3698

Closed
Closed

Description

@azz

yarn test:dist runs the tests against the built JS files, but it didn't catch an issue in 1.10 where a file with path ../../index couldn't be resolved, because in the dist directory, ../../index resolves to the original source. We could fix this by copying the files to a tempdir before running the tests.

It would be nice to test the actual .tgz file, too.

cf511ec

#3697

Activity

  1. added
    priority:high
    type:infra
    on Jan 10, 2018
  2. duailibe commented on Jan 11, 2018

    @duailibe
    Collaborator

    I've just seen this on twitter.. create a local npm registry, do an actual publish and install from it.

    react/create-react-app@99c14e7...1098a4a

  3. azz commented on Jan 11, 2018

    @azz
    MemberAuthor

    Nice. I've heard about this kind of thing.

    I think a simple way of doing this is just to use npm pack.

    dir=$(pwd)
    cd dist
    name=$(npm pack)
    
    cd $(mktemp -d)
    npm install $dir/dist/$name
    $dir/scripts/test.sh
  4. added
    locked-due-to-inactivity
    on Jul 6, 2018
  5. locked as resolved and limited conversation to collaborators on Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked-due-to-inactivitypriority:hightype:infra

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions