# Working example of aurelia-testing 1.0.0-beta.4.0.0 with ES6, jest and typescript?

**URL:** <https://discourse.aurelia.io/t/working-example-of-aurelia-testing-1-0-0-beta-4-0-0-with-es6-jest-and-typescript/754>\
**Category:** Uncategorized\
**Created:** [February 7, 2018, 6:41pm UTC](https://discourse.aurelia.io/t/working-example-of-aurelia-testing-1-0-0-beta-4-0-0-with-es6-jest-and-typescript/754 "2018-02-07T18:41:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkent600](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/dkent600/32/1603_2.png) [@dkent600](https://discourse.aurelia.io/u/dkent600)\
**Post date:** [February 7, 2018, 6:41pm UTC](https://discourse.aurelia.io/t/working-example-of-aurelia-testing-1-0-0-beta-4-0-0-with-es6-jest-and-typescript/754/1 "2018-02-07T18:41:12Z")

</div>

Can anyone point me to a working example of aurelia-testing 1.0.0-beta.4.0.0 with ES6, jest and typescript?

I am particularly interested in the package.json file and the versions of the various libraries that are compatible.

The jest/Aurelia/typescript/ES6 ecosystem of packages seems to be extremely fragile.

I am having problems such as [this one](https://github.com/aurelia/testing/issues/80).

I also need to understand how to enable jest to deal with “SyntaxError: Unexpected token export” in an ES6 javascript library that we’re using.

Thanks!

---

<div class="post-metadata">

**Author:** ![HamedFathi](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/hamedfathi/32/2099_2.png) [@HamedFathi](https://discourse.aurelia.io/u/HamedFathi)\
**Post date:** [February 7, 2018, 7:57pm UTC](https://discourse.aurelia.io/t/working-example-of-aurelia-testing-1-0-0-beta-4-0-0-with-es6-jest-and-typescript/754/2 "2018-02-07T19:57:52Z")

</div>

Hello,

Please see [Aurelia Toolbelt](https://github.com/aurelia-toolbelt/aurelia-toolbelt). We are using Jest for testing. You can find the correct configuration there.

[jest.config.json](https://github.com/aurelia-toolbelt/aurelia-toolbelt/blob/master/jest.config.json)  
[jest.setup.ts](https://github.com/aurelia-toolbelt/aurelia-toolbelt/blob/master/test/jest.setup.ts)

Although, you can see [this post](https://discourse.aurelia.io/t/solved-problem-with-testing-aurelia-components-using-jest/380) and [Aurelia Testing With Jest  
 ](https://www.schempy.com/2017/05/25/aurelia_testing_with_jest/) too.

---

<div class="post-metadata">

**Author:** ![dkent600](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/dkent600/32/1603_2.png) [@dkent600](https://discourse.aurelia.io/u/dkent600)\
**Post date:** [February 7, 2018, 8:41pm UTC](https://discourse.aurelia.io/t/working-example-of-aurelia-testing-1-0-0-beta-4-0-0-with-es6-jest-and-typescript/754/3 "2018-02-07T20:41:58Z")

</div>

Thanks, @HamedFathi

I don’t see where any of the examples you gave are using the aurelia-testing package except this one:

[[SOLVED] Problem with testing aurelia components using "jest"](https://discourse.aurelia.io/t/solved-problem-with-testing-aurelia-components-using-jest/380),

which I had seen before but wasn’t making much progress with it.

---

<div class="post-metadata">

**Author:** ![HamedFathi](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/hamedfathi/32/2099_2.png) [@HamedFathi](https://discourse.aurelia.io/u/HamedFathi)\
**Post date:** [February 7, 2018, 9:15pm UTC](https://discourse.aurelia.io/t/working-example-of-aurelia-testing-1-0-0-beta-4-0-0-with-es6-jest-and-typescript/754/4 "2018-02-07T21:15:14Z")

</div>

Did you try this? [Jest Test](https://github.com/shahabganji/jest_test)

We had created this for [[SOLVED] Problem with testing aurelia components using “jest”](https://discourse.aurelia.io/t/solved-problem-with-testing-aurelia-components-using-jest/380)

I checked it again for you and works perfectly with TS and Jest. See the result

 ![Untitled](https://canada1.discourse-cdn.com/flex027/uploads/aurelia/original/1X/b0feaeafe82ad4270e0ade324ef42d9c71ee84bd.png)

 ![Untitled](https://canada1.discourse-cdn.com/flex027/uploads/aurelia/original/1X/8b2c592add2ac69389cafad664a9d85baf08af5a.png)

We had a problem with downloading `npm_modules` If you want to have a working sample (included `npm_modules`) without a problem you should download [this](https://github.com/HamedFathi/Aurelia-Jest-Sample/blob/master/jest_test.7z). (I uploaded for you 🙂 )

Extract that and execute `npm test`. It should work like above picture  
I believe you can learn about Aurelia testing, Typescript and Jest integration with it.
