Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Example test for Hello.tsx does not work (Microsoft/TypeScript-React-Native-Starter) Ask Question #12

Open
stabenfeldt opened this issue Nov 13, 2017 · 0 comments

Comments

@stabenfeldt
Copy link

I' following the guide from https://github.com/Microsoft/TypeScript-React-Native-Starter#adding-a-component but when I run npm test I get this error:

 FAIL  src/components/__tests__/Hello.tsx
   Test suite failed to run

    xx/src/components/__tests__/Hello.tsx: Unexpected token (9:35)
         7 | const Hello_1 = require("../Hello");
         8 | it('renders correctly with defaults', () => {
      >  9 |     const hello = enzyme_1.shallow(<Hello_1.default name="World"/>);
           |                                    ^
        10 |     expect(hello.find(react_native_1.Text).render().text()).toEqual("Hello World!");
        11 | });

Any idea what's wrong?
My packages.json

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant