# Problem with executing unit test

**URL:** <https://discourse.aurelia.io/t/problem-with-executing-unit-test/4255>\
**Category:** Help Requests\
**Created:** [June 11, 2021, 10:55am UTC](https://discourse.aurelia.io/t/problem-with-executing-unit-test/4255 "2021-06-11T10:55:24Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![jkowalski](https://avatars.discourse-cdn.com/v4/letter/j/a183cd/32.png) [@jkowalski](https://discourse.aurelia.io/u/jkowalski)\
**Post date:** [June 16, 2021, 9:23am UTC](https://discourse.aurelia.io/t/problem-with-executing-unit-test/4255/5 "2021-06-16T09:23:58Z")

</div>

In my case it doesn’t work neither with “aurelia-framework” (info from documentation) nor “aurelia-pal” ☹

```auto
import {bootstrap} from 'aurelia-bootstrapper';
import {StageComponent} from 'aurelia-testing';
import {PLATFORM} from 'aurelia-pal';

describe('Testing nav-bar', () => {
    let component;
    let navBarBinding;

    beforeEach(() => {
        navBarBinding = {
            state: {
                showNav: false
            },
            nav: null
        };
        component = StageComponent
            .withResources(PLATFORM.moduleName('./app/nav-bar'))
            .inView('<nav-bar if.bind="navBarBinding.state.showNav" nav.bind="navBarBinding.nav"></nav-bar>')
            .boundTo(navBarBinding);
    });

    test('First try', async () => {
        await component.create(bootstrap);
        expect('3').toEqual('4');

    });
});

```

> ReferenceError: \_\_ webpack\_require \_\_ is not defined  
> Hint:  
> aurelia-loader-webpack.js:185:25

Could you Tomas check if in webpack.config you have included/used aurelia-testing?

EDIT:  
I’ve taken your exmple Tomas (with my simple component) and still get webpack\_require error 😕

---

_[View the full topic](https://discourse.aurelia.io/t/problem-with-executing-unit-test/4255)._
