# Best way to build/test AU2

**URL:** <https://discourse.aurelia.io/t/best-way-to-build-test-au2/4180>\
**Category:** Uncategorized\
**Created:** [April 14, 2021, 7:26pm UTC](https://discourse.aurelia.io/t/best-way-to-build-test-au2/4180 "2021-04-14T19:26:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![avrahamcool](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/avrahamcool/32/368_2.png) [@avrahamcool](https://discourse.aurelia.io/u/avrahamcool)\
**Post date:** [April 14, 2021, 7:26pm UTC](https://discourse.aurelia.io/t/best-way-to-build-test-au2/4180/1 "2021-04-14T19:26:12Z")

</div>

hello,

I want to contribute something to a very specific part of AU2 codebase.  
ideally, I want to have a terminal that runs a specific set of tests (in chrome headless).  
while watching for changes on a specific area of the codebase, and a specific area of the tests.

I don’t want to use the npm scripts that are currently defined - because they run all of tests - this take several minutes each run.

what is the recommended way of developing features in AU2 are you using?

---

<div class="post-metadata">

**Author:** ![bigopon](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/bigopon/32/18_2.png) [@bigopon](https://discourse.aurelia.io/u/bigopon)\
**Post date:** [April 14, 2021, 9:57pm UTC](https://discourse.aurelia.io/t/best-way-to-build-test-au2/4180/2 "2021-04-14T21:57:46Z")

</div>

There’ 3 parts where you can make things run faster:

- faster recompilation, via tsconfig.json change:  
in the `tsconfig.json` of the ` __tests__ ` package, add the specific folder you want to compile. Example for focusing on `3-runtime-html`, change from:

```json
"include": ["."],

```

to:

```json
"include": ["./*.ts", "./3-runtime-html/**/*.ts"],

```

- focused package, via `testDirs` change:  
in the `karma.conf.js` of the ` __tests__ ` package, comment out the test folder that you don’t want to run. Example for focusing on `runtime-html`:

```auto
const testDirs = [
  // '1-kernel',
  // '2-runtime',
  '3-runtime-html',
  // 'fetch-client',
  // 'i18n',
  // 'integration',
  // 'router',
  // 'validation',
  // 'validation-html',
  // 'validation-i18n',
];

```

- focused files, via files change:  
in the `karma.conf.js` of the ` __tests__ ` package, change `use a specific file name` you want to target in the `2.1` config. Example of focusing on `3-runtime-html/binding-resources.spec.ts` for `debounce` & `throttle`, change from:

```auto
{ type: 'module', watched: true, included: true, nocache: false, pattern: `packages/ __tests__ /dist/esm/ __tests__ /${name}/**/*.spec.js` }, // 2.1

```

to

```auto
{ type: 'module', watched: true, included: true, nocache: false, pattern: `packages/ __tests__ /dist/esm/ __tests__ /${name}/**/binding-resources.spec.js` }, // 2.1

```

---

<div class="post-metadata">

**Author:** ![avrahamcool](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/avrahamcool/32/368_2.png) [@avrahamcool](https://discourse.aurelia.io/u/avrahamcool)\
**Post date:** [April 14, 2021, 11:13pm UTC](https://discourse.aurelia.io/t/best-way-to-build-test-au2/4180/3 "2021-04-14T23:13:28Z")

</div>

thank you again. 🙂  
Ill try that.

---

<div class="post-metadata">

**Author:** ![hamblingreg52](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/hamblingreg52/32/2053_2.png) [@hamblingreg52](https://discourse.aurelia.io/u/hamblingreg52)\
**Post date:** [April 21, 2021, 6:27am UTC](https://discourse.aurelia.io/t/best-way-to-build-test-au2/4180/4 "2021-04-21T06:27:19Z")

</div>

@avrahamcool I think your dission is right. You should contribute with AU2. Hopeful i will also contribute with AU2. 🙂
