amazon-archives / awsmobile-cli

CLI experience for Frontend developers in the JavaScript ecosystem.
Apache License 2.0
142 stars 35 forks source link

Fresh `awsmobile start test-project react-native` creates a project with failing tests #132

Closed dcgudeman closed 6 years ago

dcgudeman commented 6 years ago

running awsmobile start test-project react-native creates a project with failing jest tests. Without making any changes to the project if I run yarn test I get this result:

  ● Test suite failed to run

    /test-project/App.test.js: Unexpected token (19:35)
        17 |
        18 | it('renders without crashing', () => {
      > 19 |   const rendered = renderer.create(<App />).toJSON();
           |                                    ^
        20 |   expect(rendered).toBeTruthy();
        21 | });
        22 |

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        0.771s
UnleashedMind commented 6 years ago

I just reproduced it. /test-project/App.test.js is useless, and it'll just be removed from the starter.

UnleashedMind commented 6 years ago

That file is removed from the starter.

dcgudeman commented 6 years ago

@UnleashedMind well that's great that when I run yarn test I won't see any failing tests, however, I think an example of a passing test would be good for the starter. As of right now I don't know if you could tests components with the current setup/dependencies. An example of a working jest test would not only give an example to copy from but it would also validate the starter has the correct setup to work with jest.