Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Get tests up and running #49

Merged
merged 4 commits into from
May 13, 2017
Merged

Get tests up and running #49

merged 4 commits into from
May 13, 2017

Conversation

migerh
Copy link
Contributor

@migerh migerh commented Apr 29, 2017

This PR fixes ./tasks/e2e-simple.sh and ./tasks/e2e-installs.sh.

./tasks/e2e-kitchensink.sh still does not work since it depends on the sample project ./packages/react-scripts/fixtures/kitchensink/ which is not ported to TypeScript yet.

One test had to be disabled. It only tests that the dev environment still works so I think it should be expendable. The problem is the template in ./packages/react-scripts/template. It has no package.json of its own so its node_modules are stored in the parent folder. Apparently autoloading the node and jest @types then fails, although it should work according to the TypeScript docs [1]. I only managed to get it to work by adjusting the tsconfig.json and setting the typesRoot to the parent's node_modules. That change would also be part of the tsconfig.json deployed to the apps created with this package.

b03c7a4 is just a fix so the build script also runs with node 4. If you don't want to support node 4 you can omit this commit. You may want to adjust the .travis.yml config if you want to activate Travis.

I activated Travis on my fork and it is looking good so far: https://travis-ci.org/migerh/create-react-app-typescript/builds/227103514

[1] https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#types-typeroots-and-types

migerh added 4 commits April 29, 2017 08:32
This test fails because TypeScript can't find the definitions
for node and jest. A fix affects the production tsconfig so
for now the best solution seems to be to deactivate this
specific test.
These tests rely on an example project that has to be migrated
to TypeScript first.
Certain es6 features like destructuring and default parameters are not
supported by node 4.x.
@wmonk
Copy link
Owner

wmonk commented Apr 29, 2017

This is awesome! Let me take a proper look and we'll get it merged!

@wmonk wmonk merged commit ad0dcc9 into wmonk:master May 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants