Skip to content

Tests are using code from npm instead of code from pull request #5440

@brunolemos

Description

@brunolemos

Possibly a regression from 5fecfee.
Blocking #4837.

Is this a bug report?

Yes

Environment

System:
OS: macOS 10.14
CPU: x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
Binaries:
Node: 8.11.4 - /usr/local/bin/node
Yarn: 1.10.1 - ~/.yarn/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Browsers:
Chrome: 69.0.3497.100
Firefox: 59.0.2
Safari: 12.0
npmPackages:
@stiligita/react: 1.0.0-0
@types/react: 16.4.14
@types/react-dom: 16.0.8
react: 16.5.2
react-dom: 16.5.2
react-scripts: 2.0.5 (#4837)
npmGlobalPackages:
create-react-app: Not Found (#4837)

Steps to Reproduce

  • Fork TypeScript support using Babel 7 #4837
  • Run CI=false npx jest --config ./test/jest.config.js --testMatch '<rootDir>/**/typescript/*.test.js' (pass)
  • Run CI=true npx jest --config ./test/jest.config.js --testMatch '<rootDir>/**/typescript/*.test.js' (fail)

Expected Behavior

Tests should pass because they are correct.
CRA should use the current code of each pull request, not a version from npm.

Actual Behavior

TypeScript tests fails because it tries to use the cra version from npm, which doesn't support typescript.

Reproducible Demo

#4837

Possibly related code

this.isLocal = !(process.env.CI && process.env.CI !== 'false');

const shouldInstallScripts = !this.isLocal;
if (shouldInstallScripts) {
packageJson.dependencies = Object.assign({}, packageJson.dependencies, {
'react-scripts': 'latest',
});
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions