aurelia / testing

Simplifies the testing of UI components by providing an elegant, fluent interface for arranging test setups along with a number of runtime debug/test helpers.
MIT License
40 stars 27 forks source link

testing fails when custom elements are composed dynamically #33

Closed ajoslin103 closed 8 years ago

ajoslin103 commented 8 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior: testing fails when custom elements are composed dynamically

for example:

compose
The compose Custom Element enables you to dynamically render UI into the DOM. Imagine you have a heterogeneous array of items, but each has a type property which tells you what it is. You can then do something like this:
<template repeat.for="item of items">
    <compose
      model.bind="item"
      view-model="widgets/${item.type}">
    </compose>
</template>

Expected/desired behavior:

https://gist.run/?id=c04050650da1b2ea3d14b69e8380523b

I do not know how to npm start test on this gist -- when I run npm start test on my machine I get this output and things fail

TL;DR

WARNING in ./~/aurelia-bootstrapper/dist/commonjs/aurelia-bootstrapper.js
60:13 Critical dependency: the request of a dependency is an expression

WARNING in ./~/aurelia-bootstrapper/dist/commonjs/aurelia-bootstrapper.js
68:13 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

[...]

ContentVideo
  ✖ should define video - via the ref tag
Chrome 54.0.2837 (Mac OS X 10.11.6) ContentVideo should define video - via the ref tag FAILED
      ReferenceError: type is not defined
          at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:10:42 <- spec-bundle.js:17686:122)
          at ContextKarma.loaded (http://localhost:9876/context.js:151:12)
      TypeError: Cannot read property 'create' of undefined
          at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:23:12 <- spec-bundle.js:17692:12)
          at ContextKarma.loaded (http://localhost:9876/context.js:151:12)
      TypeError: Cannot read property 'dispose' of undefined
          at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:37:12 <- spec-bundle.js:17706:12)
          at ContextKarma.loaded (http://localhost:9876/context.js:151:12)
  ✖ should define source - via the ref tag
Chrome 54.0.2837 (Mac OS X 10.11.6) ContentVideo should define source - via the ref tag FAILED
      ReferenceError: type is not defined
          at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:10:42 <- spec-bundle.js:17686:122)
          at ContextKarma.loaded (http://localhost:9876/context.js:151:12)
      TypeError: Cannot read property 'create' of undefined
          at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:30:12 <- spec-bundle.js:17699:12)
          at ContextKarma.loaded (http://localhost:9876/context.js:151:12)
      TypeError: Cannot read property 'dispose' of undefined
          at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:37:12 <- spec-bundle.js:17706:12)
          at ContextKarma.loaded (http://localhost:9876/context.js:151:12)

full log

> aurelia-skeleton-navigation-webpack@1.0.0 test /Users/ajoslin/Desktop/test-dynamic
> cross-env NODE_ENV=test ./node_modules/karma/bin/karma start test/karma.conf.js

START:
Hash: 1236238e469ccd027c23
Version: webpack 2.1.0-beta.21
Time: 1959ms
                                 Asset       Size  Chunks             Chunk Names
 fa2772327f55d8198301fdb8bcfc8158.woff    23.4 kB          [emitted]
  25a32416abee198dd821b0b17a198a8f.eot    76.5 kB          [emitted]
  1dc35d25e61d819a9c357074014867ab.ttf     153 kB          [emitted]
 c8ddf1e5e5bf3682bc7bebf30f394148.woff    90.4 kB          [emitted]
e6cf7c6ec7c2d6f670ae9d762604cb0b.woff2    71.9 kB          [emitted]
  f4769f9bdb7466be65088239c12046d1.eot    20.1 kB          [emitted]
  89889688147bd7575d6327160d64e760.svg     109 kB          [emitted]
  e18bbf611f2a2e43afc071aa2f4e1512.ttf    45.4 kB          [emitted]
  d7c639084f684d66a1bc66855d193ed8.svg     392 kB          [emitted]
448c34a56d699c29117adc64c43affeb.woff2      18 kB          [emitted]
                                   app    1.03 MB       0  [emitted]  app
                               aurelia     777 kB       1  [emitted]  aurelia
                        spec-bundle.js    1.66 MB       2  [emitted]  spec-bundle.js
                     aurelia-bootstrap     280 kB       3  [emitted]  aurelia-bootstrap
                            styles.css     184 kB       0  [emitted]  app
                            index.html  669 bytes          [emitted]
chunk    {0} app, styles.css (app) 1.01 MB {1} {3} {2} [entry]
    [1] ./~/aurelia-templating/dist/commonjs/aurelia-templating.js 148 kB {0} {1} {2} [built]
    [2] ./~/aurelia-dependency-injection/dist/commonjs/aurelia-dependency-injection.js 20.7 kB {0} {1} {2} [built]
 [aurelia-templating-resources/throttle-binding-behavior.js] ./~/aurelia-templating-resources/dist/commonjs/throttle-binding-behavior.js 1.92 kB {0} {1} [built]
    [3] ./~/aurelia-binding/dist/commonjs/aurelia-binding.js 166 kB {0} {1} {2} [built]
    [5] ./~/aurelia-logging/dist/commonjs/aurelia-logging.js 2.11 kB {0} {1} {2} [built]
    [8] ./~/aurelia-task-queue/dist/commonjs/aurelia-task-queue.js 3.21 kB {0} {1} {2} [built]
   [11] ./~/aurelia-templating-resources/dist/commonjs/repeat-utilities.js 3 kB {0} {1} [built]
   [13] ./~/aurelia-templating-resources/dist/commonjs/aurelia-hide-style.js 829 bytes {0} {1} [built]
   [14] ./~/aurelia-history/dist/commonjs/aurelia-history.js 810 bytes {0} {1} [built]
   [15] ./~/aurelia-templating-resources/dist/commonjs/abstract-repeater.js 1.96 kB {0} {1} [built]
   [16] ./~/aurelia-templating-resources/dist/commonjs/analyze-view-factory.js 1.79 kB {0} {1} [built]
   [17] ./~/aurelia-templating-resources/dist/commonjs/array-repeat-strategy.js 8.31 kB {0} {1} [built]
   [18] ./~/aurelia-templating-resources/dist/commonjs/binding-signaler.js 583 bytes {0} {1} [built]
   [19] ./~/aurelia-templating-resources/dist/commonjs/html-sanitizer.js 397 bytes {0} {1} [built]
   [20] ./~/aurelia-templating-resources/dist/commonjs/map-repeat-strategy.js 3.7 kB {0} {1} [built]
   [21] ./~/aurelia-templating-resources/dist/commonjs/null-repeat-strategy.js 473 bytes {0} {1} [built]
   [22] ./~/aurelia-templating-resources/dist/commonjs/number-repeat-strategy.js 1.8 kB {0} {1} [built]
   [23] ./~/aurelia-templating-resources/dist/commonjs/repeat-strategy-locator.js 1.76 kB {0} {1} [built]
   [24] ./~/aurelia-templating-resources/dist/commonjs/set-repeat-strategy.js 3.1 kB {0} {1} [built]
   [26] ./~/regenerator-runtime/runtime-module.js 1.01 kB {0} {3} [built]
   [27] ./~/aurelia-templating-resources/dist/commonjs/css-resource.js 3.76 kB {0} {1} [built]
   [28] ./~/aurelia-templating-resources/dist/commonjs/dynamic-element.js 834 bytes {0} {1} [built]
   [29] ./~/aurelia-templating-resources/dist/commonjs/html-resource-plugin.js 1.2 kB {0} {1} [built]
   [30] ./~/aurelia-templating-router/dist/commonjs/route-loader.js 2.49 kB {0} {1} [built]
   [31] ./~/regenerator-runtime/runtime.js 21.8 kB {0} {3} [built]
   [32] ./src ^\.\/.*$ 2.43 kB {0} [built]
   [43] ./~/bootstrap/js/affix.js 4.84 kB {0} [built]
   [44] ./~/bootstrap/js/alert.js 2.28 kB {0} [built]
   [45] ./~/bootstrap/js/button.js 3.82 kB {0} [built]
   [46] ./~/bootstrap/js/carousel.js 7.14 kB {0} [built]
   [47] ./~/bootstrap/js/collapse.js 5.99 kB {0} [built]
   [48] ./~/bootstrap/js/dropdown.js 4.74 kB {0} [built]
   [49] ./~/bootstrap/js/modal.js 9.99 kB {0} [built]
   [50] ./~/bootstrap/js/popover.js 3.16 kB {0} [built]
   [51] ./~/bootstrap/js/scrollspy.js 4.71 kB {0} [built]
   [52] ./~/bootstrap/js/tab.js 3.9 kB {0} [built]
   [53] ./~/bootstrap/js/tooltip.js 16.7 kB {0} [built]
 [aurelia-templating-resources/with.js] ./~/aurelia-templating-resources/dist/commonjs/with.js 1.55 kB {0} {1} [built]
   [54] ./~/bootstrap/js/transition.js 1.83 kB {0} [built]
   [55] ./~/expose-loader?jQuery!./~/jquery/dist/jquery.js 120 bytes {0}
   [56] ./~/bootstrap/dist/css/bootstrap.css 41 bytes {0} [built]
   [57] ./~/font-awesome/css/font-awesome.css 41 bytes {0} [built]
   [58] ./styles/styles.css 41 bytes {0} [built]
   [59] ./~/jquery/dist/jquery.js 264 kB {0} [built]
   [60] ./~/whatwg-fetch/fetch.js 11.6 kB {0} [built]
   [62] multi app 16 bytes {0}
 [app.html] ./src/app.html 216 bytes {0} [optional] [built]
 [app.js] ./src/app.js 5.02 kB {0} {2} [built]
 [aurelia-bootstrapper-webpack] ./~/aurelia-bootstrapper-webpack/dist/commonjs/aurelia-bootstrapper-webpack.js 2.54 kB {0} {2} {3} [built]
 [aurelia-event-aggregator] ./~/aurelia-event-aggregator/dist/commonjs/aurelia-event-aggregator.js 3.3 kB {0} {1} [built]
 [aurelia-fetch-client] ./~/aurelia-fetch-client/dist/commonjs/aurelia-fetch-client.js 7.56 kB {0} [optional] [built]
 [aurelia-framework] ./~/aurelia-framework/dist/commonjs/aurelia-framework.js 16.8 kB {0} {1} {2} [built]
 [aurelia-history-browser] ./~/aurelia-history-browser/dist/commonjs/aurelia-history-browser.js 9.37 kB {0} {1} [built]
 [aurelia-logging-console] ./~/aurelia-logging-console/dist/commonjs/aurelia-logging-console.js 1.67 kB {0} {1} [built]
 [aurelia-pal-browser] ./~/aurelia-pal-browser/dist/commonjs/aurelia-pal-browser.js 15 kB {0} {2} {3} [built]
 [aurelia-polyfills] ./~/aurelia-polyfills/dist/commonjs/aurelia-polyfills.js 22.2 kB {0} {2} {3} [built]
 [aurelia-route-recognizer] ./~/aurelia-route-recognizer/dist/commonjs/aurelia-route-recognizer.js 11.6 kB {0} {1} [built]
 [aurelia-router] ./~/aurelia-router/dist/commonjs/aurelia-router.js 54.2 kB {0} {1} [built]
 [aurelia-templating-binding] ./~/aurelia-templating-binding/dist/commonjs/aurelia-templating-binding.js 24.5 kB {0} {1} [built]
 [aurelia-templating-resources] ./~/aurelia-templating-resources/dist/commonjs/aurelia-templating-resources.js 5.28 kB {0} {1} [built]
 [aurelia-templating-resources/binding-mode-behaviors.js] ./~/aurelia-templating-resources/dist/commonjs/binding-mode-behaviors.js 1.35 kB {0} {1} [built]
 [aurelia-templating-resources/compose.js] ./~/aurelia-templating-resources/dist/commonjs/compose.js 6.22 kB {0} {1} [built]
 [aurelia-templating-resources/debounce-binding-behavior.js] ./~/aurelia-templating-resources/dist/commonjs/debounce-binding-behavior.js 1.73 kB {0} {1} [built]
 [aurelia-templating-resources/focus.js] ./~/aurelia-templating-resources/dist/commonjs/focus.js 2.1 kB {0} {1} [built]
 [aurelia-templating-resources/hide.js] ./~/aurelia-templating-resources/dist/commonjs/hide.js 1.38 kB {0} {1} [built]
 [aurelia-templating-resources/if.js] ./~/aurelia-templating-resources/dist/commonjs/if.js 2.99 kB {0} {1} [built]
 [aurelia-templating-resources/repeat.js] ./~/aurelia-templating-resources/dist/commonjs/repeat.js 11.2 kB {0} {1} [built]
 [aurelia-templating-resources/replaceable.js] ./~/aurelia-templating-resources/dist/commonjs/replaceable.js 1.14 kB {0} {1} [built]
 [aurelia-templating-resources/sanitize-html.js] ./~/aurelia-templating-resources/dist/commonjs/sanitize-html.js 983 bytes {0} {1} [built]
 [aurelia-templating-resources/show.js] ./~/aurelia-templating-resources/dist/commonjs/show.js 1.38 kB {0} {1} [built]
 [aurelia-templating-resources/signal-binding-behavior.js] ./~/aurelia-templating-resources/dist/commonjs/signal-binding-behavior.js 1.88 kB {0} {1} [built]
 [aurelia-templating-resources/update-trigger-binding-behavior.js] ./~/aurelia-templating-resources/dist/commonjs/update-trigger-binding-behavior.js 1.88 kB {0} {1} [built]
 [aurelia-templating-router] ./~/aurelia-templating-router/dist/commonjs/aurelia-templating-router.js 862 bytes {0} {1} [built]
 [aurelia-templating-router/route-href.js] ./~/aurelia-templating-router/dist/commonjs/route-href.js 2.37 kB {0} {1} [built]
 [aurelia-templating-router/router-view.js] ./~/aurelia-templating-router/dist/commonjs/router-view.js 8.75 kB {0} {1} [built]
 [bootstrap] ./~/bootstrap/dist/js/npm.js 484 bytes {0} [built]
 [content-image.html] ./src/content-image.html 205 bytes {0} [optional] [built]
 [content-image.js] ./src/content-image.js 4.41 kB {0} [optional] [built]
 [content-video.html] ./src/content-video.html 302 bytes {0} [optional] [built]
 [content-video.js] ./src/content-video.js 4.46 kB {0} [optional] [built]
 [isomorphic-fetch] ./~/isomorphic-fetch/fetch-npm-browserify.js 233 bytes {0} [optional] [built]
 [jquery] ./~/jquery/dist/jquery.js 194 bytes {0}
 [main.js] ./src/main.js 16.3 kB {0} [optional] [built]
 [nav-bar.html] ./src/nav-bar.html 1.27 kB {0} [optional] [built]
 [welcome copy.html] ./src/welcome copy.html 122 bytes {0} [optional] [built]
 [welcome.html] ./src/welcome.html 122 bytes {0} [optional] [built]
 [welcome.js] ./src/welcome.js 3.44 kB {0} [optional] [built]
chunk    {1} aurelia (aurelia) 763 kB [entry]
    [0] ./~/aurelia-pal/dist/commonjs/aurelia-pal.js 1.97 kB {1} {2} {3} [built]
    [1] ./~/aurelia-templating/dist/commonjs/aurelia-templating.js 148 kB {0} {1} {2} [built]
    [2] ./~/aurelia-dependency-injection/dist/commonjs/aurelia-dependency-injection.js 20.7 kB {0} {1} {2} [built]
 [aurelia-templating-resources/hide.js] ./~/aurelia-templating-resources/dist/commonjs/hide.js 1.38 kB {0} {1} [built]
    [3] ./~/aurelia-binding/dist/commonjs/aurelia-binding.js 166 kB {0} {1} {2} [built]
    [4] ./~/aurelia-metadata/dist/commonjs/aurelia-metadata.js 6.67 kB {1} {2} {3} [built]
    [5] ./~/aurelia-logging/dist/commonjs/aurelia-logging.js 2.11 kB {0} {1} {2} [built]
    [6] ./~/aurelia-path/dist/commonjs/aurelia-path.js 5.46 kB {1} {2} {3} [built]
    [7] (webpack)/buildin/global.js 506 bytes {1} {2} {3} [built]
    [8] ./~/aurelia-task-queue/dist/commonjs/aurelia-task-queue.js 3.21 kB {0} {1} {2} [built]
    [9] ./~/aurelia-loader/dist/commonjs/aurelia-loader.js 4.58 kB {1} {2} {3} [built]
   [10] ./~/timers-browserify/main.js 2.1 kB {1} {2} {3} [built]
   [11] ./~/aurelia-templating-resources/dist/commonjs/repeat-utilities.js 3 kB {0} {1} [built]
   [12] ./~/process/browser.js 4.51 kB {1} {2} {3} [built]
   [13] ./~/aurelia-templating-resources/dist/commonjs/aurelia-hide-style.js 829 bytes {0} {1} [built]
   [14] ./~/aurelia-history/dist/commonjs/aurelia-history.js 810 bytes {0} {1} [built]
   [15] ./~/aurelia-templating-resources/dist/commonjs/abstract-repeater.js 1.96 kB {0} {1} [built]
   [16] ./~/aurelia-templating-resources/dist/commonjs/analyze-view-factory.js 1.79 kB {0} {1} [built]
   [17] ./~/aurelia-templating-resources/dist/commonjs/array-repeat-strategy.js 8.31 kB {0} {1} [built]
   [18] ./~/aurelia-templating-resources/dist/commonjs/binding-signaler.js 583 bytes {0} {1} [built]
   [19] ./~/aurelia-templating-resources/dist/commonjs/html-sanitizer.js 397 bytes {0} {1} [built]
   [20] ./~/aurelia-templating-resources/dist/commonjs/map-repeat-strategy.js 3.7 kB {0} {1} [built]
   [21] ./~/aurelia-templating-resources/dist/commonjs/null-repeat-strategy.js 473 bytes {0} {1} [built]
   [22] ./~/aurelia-templating-resources/dist/commonjs/number-repeat-strategy.js 1.8 kB {0} {1} [built]
   [23] ./~/aurelia-templating-resources/dist/commonjs/repeat-strategy-locator.js 1.76 kB {0} {1} [built]
   [24] ./~/aurelia-templating-resources/dist/commonjs/set-repeat-strategy.js 3.1 kB {0} {1} [built]
   [25] ./~/bluebird/js/browser/bluebird.js 176 kB {1} {2} {3} [built]
   [27] ./~/aurelia-templating-resources/dist/commonjs/css-resource.js 3.76 kB {0} {1} [built]
   [28] ./~/aurelia-templating-resources/dist/commonjs/dynamic-element.js 834 bytes {0} {1} [built]
 [aurelia-templating-resources/replaceable.js] ./~/aurelia-templating-resources/dist/commonjs/replaceable.js 1.14 kB {0} {1} [built]
   [29] ./~/aurelia-templating-resources/dist/commonjs/html-resource-plugin.js 1.2 kB {0} {1} [built]
   [30] ./~/aurelia-templating-router/dist/commonjs/route-loader.js 2.49 kB {0} {1} [built]
   [63] multi aurelia 244 bytes {1}
 [aurelia-event-aggregator] ./~/aurelia-event-aggregator/dist/commonjs/aurelia-event-aggregator.js 3.3 kB {0} {1} [built]
 [aurelia-framework] ./~/aurelia-framework/dist/commonjs/aurelia-framework.js 16.8 kB {0} {1} {2} [built]
 [aurelia-history-browser] ./~/aurelia-history-browser/dist/commonjs/aurelia-history-browser.js 9.37 kB {0} {1} [built]
 [aurelia-loader-webpack] ./~/aurelia-loader-webpack/dist/commonjs/aurelia-loader-webpack.js 7.04 kB {1} {2} {3} [built]
 [aurelia-logging-console] ./~/aurelia-logging-console/dist/commonjs/aurelia-logging-console.js 1.67 kB {0} {1} [built]
 [aurelia-route-recognizer] ./~/aurelia-route-recognizer/dist/commonjs/aurelia-route-recognizer.js 11.6 kB {0} {1} [built]
 [aurelia-router] ./~/aurelia-router/dist/commonjs/aurelia-router.js 54.2 kB {0} {1} [built]
 [aurelia-templating-binding] ./~/aurelia-templating-binding/dist/commonjs/aurelia-templating-binding.js 24.5 kB {0} {1} [built]
 [aurelia-templating-resources] ./~/aurelia-templating-resources/dist/commonjs/aurelia-templating-resources.js 5.28 kB {0} {1} [built]
 [aurelia-templating-resources/binding-mode-behaviors.js] ./~/aurelia-templating-resources/dist/commonjs/binding-mode-behaviors.js 1.35 kB {0} {1} [built]
 [aurelia-templating-resources/compose.js] ./~/aurelia-templating-resources/dist/commonjs/compose.js 6.22 kB {0} {1} [built]
 [aurelia-templating-resources/debounce-binding-behavior.js] ./~/aurelia-templating-resources/dist/commonjs/debounce-binding-behavior.js 1.73 kB {0} {1} [built]
 [aurelia-templating-resources/focus.js] ./~/aurelia-templating-resources/dist/commonjs/focus.js 2.1 kB {0} {1} [built]
 [aurelia-templating-resources/if.js] ./~/aurelia-templating-resources/dist/commonjs/if.js 2.99 kB {0} {1} [built]
 [aurelia-templating-resources/repeat.js] ./~/aurelia-templating-resources/dist/commonjs/repeat.js 11.2 kB {0} {1} [built]
 [aurelia-templating-resources/sanitize-html.js] ./~/aurelia-templating-resources/dist/commonjs/sanitize-html.js 983 bytes {0} {1} [built]
 [aurelia-templating-resources/show.js] ./~/aurelia-templating-resources/dist/commonjs/show.js 1.38 kB {0} {1} [built]
 [aurelia-templating-resources/signal-binding-behavior.js] ./~/aurelia-templating-resources/dist/commonjs/signal-binding-behavior.js 1.88 kB {0} {1} [built]
 [aurelia-templating-resources/throttle-binding-behavior.js] ./~/aurelia-templating-resources/dist/commonjs/throttle-binding-behavior.js 1.92 kB {0} {1} [built]
 [aurelia-templating-resources/update-trigger-binding-behavior.js] ./~/aurelia-templating-resources/dist/commonjs/update-trigger-binding-behavior.js 1.88 kB {0} {1} [built]
 [aurelia-templating-resources/with.js] ./~/aurelia-templating-resources/dist/commonjs/with.js 1.55 kB {0} {1} [built]
 [aurelia-templating-router] ./~/aurelia-templating-router/dist/commonjs/aurelia-templating-router.js 862 bytes {0} {1} [built]
 [aurelia-templating-router/route-href.js] ./~/aurelia-templating-router/dist/commonjs/route-href.js 2.37 kB {0} {1} [built]
 [aurelia-templating-router/router-view.js] ./~/aurelia-templating-router/dist/commonjs/router-view.js 8.75 kB {0} {1} [built]
 [bluebird] ./~/bluebird/js/browser/bluebird.js 131 bytes {1} {2} {3}
chunk    {2} spec-bundle.js (spec-bundle.js) 628 kB [entry]
    [0] ./~/aurelia-pal/dist/commonjs/aurelia-pal.js 1.97 kB {1} {2} {3} [built]
    [1] ./~/aurelia-templating/dist/commonjs/aurelia-templating.js 148 kB {0} {1} {2} [built]
    [2] ./~/aurelia-dependency-injection/dist/commonjs/aurelia-dependency-injection.js 20.7 kB {0} {1} {2} [built]
    [3] ./~/aurelia-binding/dist/commonjs/aurelia-binding.js 166 kB {0} {1} {2} [built]
    [4] ./~/aurelia-metadata/dist/commonjs/aurelia-metadata.js 6.67 kB {1} {2} {3} [built]
    [5] ./~/aurelia-logging/dist/commonjs/aurelia-logging.js 2.11 kB {0} {1} {2} [built]
    [6] ./~/aurelia-path/dist/commonjs/aurelia-path.js 5.46 kB {1} {2} {3} [built]
    [7] (webpack)/buildin/global.js 506 bytes {1} {2} {3} [built]
    [8] ./~/aurelia-task-queue/dist/commonjs/aurelia-task-queue.js 3.21 kB {0} {1} {2} [built]
    [9] ./~/aurelia-loader/dist/commonjs/aurelia-loader.js 4.58 kB {1} {2} {3} [built]
   [10] ./~/timers-browserify/main.js 2.1 kB {1} {2} {3} [built]
   [12] ./~/process/browser.js 4.51 kB {1} {2} {3} [built]
   [25] ./~/bluebird/js/browser/bluebird.js 176 kB {1} {2} {3} [built]
   [33] ./test/unit \.spec\.(ts|js) 206 bytes {2} [built]
   [34] ./~/aurelia-bootstrapper/dist/commonjs 160 bytes {2} [built]
   [35] ./~/aurelia-bootstrapper/dist/commonjs async 160 bytes {2} [built]
   [36] ./~/aurelia-bootstrapper/dist/commonjs/aurelia-bootstrapper.js 4.48 kB {2} [built]
   [37] ./~/aurelia-testing/dist/commonjs/aurelia-testing.js 659 bytes {2} [built]
   [38] ./~/aurelia-testing/dist/commonjs/compile-spy.js 1.08 kB {2} [built]
   [39] ./~/aurelia-testing/dist/commonjs/component-tester.js 4.21 kB {2} [built]
   [40] ./~/aurelia-testing/dist/commonjs/view-spy.js 1.59 kB {2} [built]
   [41] ./test/unit/app.spec.js 1.13 kB {2} [optional] [built]
 [app.js] ./src/app.js 5.02 kB {0} {2} [built]
   [42] ./test/unit/content-video.spec.js 1.27 kB {2} [optional] [built]
   [61] ./test/spec-bundle.js 1.51 kB {2} [built]
 [aurelia-bootstrapper-webpack] ./~/aurelia-bootstrapper-webpack/dist/commonjs/aurelia-bootstrapper-webpack.js 2.54 kB {0} {2} {3} [built]
 [aurelia-framework] ./~/aurelia-framework/dist/commonjs/aurelia-framework.js 16.8 kB {0} {1} {2} [built]
 [aurelia-loader-webpack] ./~/aurelia-loader-webpack/dist/commonjs/aurelia-loader-webpack.js 7.04 kB {1} {2} {3} [built]
 [aurelia-pal-browser] ./~/aurelia-pal-browser/dist/commonjs/aurelia-pal-browser.js 15 kB {0} {2} {3} [built]
 [aurelia-polyfills] ./~/aurelia-polyfills/dist/commonjs/aurelia-polyfills.js 22.2 kB {0} {2} {3} [built]
 [bluebird] ./~/bluebird/js/browser/bluebird.js 131 bytes {1} {2} {3}
chunk    {3} aurelia-bootstrap (aurelia-bootstrap) 272 kB [entry]
    [0] ./~/aurelia-pal/dist/commonjs/aurelia-pal.js 1.97 kB {1} {2} {3} [built]
    [4] ./~/aurelia-metadata/dist/commonjs/aurelia-metadata.js 6.67 kB {1} {2} {3} [built]
    [6] ./~/aurelia-path/dist/commonjs/aurelia-path.js 5.46 kB {1} {2} {3} [built]
    [7] (webpack)/buildin/global.js 506 bytes {1} {2} {3} [built]
    [9] ./~/aurelia-loader/dist/commonjs/aurelia-loader.js 4.58 kB {1} {2} {3} [built]
   [10] ./~/timers-browserify/main.js 2.1 kB {1} {2} {3} [built]
   [12] ./~/process/browser.js 4.51 kB {1} {2} {3} [built]
   [25] ./~/bluebird/js/browser/bluebird.js 176 kB {1} {2} {3} [built]
   [26] ./~/regenerator-runtime/runtime-module.js 1.01 kB {0} {3} [built]
   [31] ./~/regenerator-runtime/runtime.js 21.8 kB {0} {3} [built]
   [64] multi aurelia-bootstrap 88 bytes {3}
 [aurelia-bootstrapper-webpack] ./~/aurelia-bootstrapper-webpack/dist/commonjs/aurelia-bootstrapper-webpack.js 2.54 kB {0} {2} {3} [built]
 [aurelia-loader-webpack] ./~/aurelia-loader-webpack/dist/commonjs/aurelia-loader-webpack.js 7.04 kB {1} {2} {3} [built]
 [aurelia-pal-browser] ./~/aurelia-pal-browser/dist/commonjs/aurelia-pal-browser.js 15 kB {0} {2} {3} [built]
 [aurelia-polyfills] ./~/aurelia-polyfills/dist/commonjs/aurelia-polyfills.js 22.2 kB {0} {2} {3} [built]
 [bluebird] ./~/bluebird/js/browser/bluebird.js 131 bytes {1} {2} {3}

WARNING in ./~/aurelia-bootstrapper/dist/commonjs/aurelia-bootstrapper.js
60:13 Critical dependency: the request of a dependency is an expression

WARNING in ./~/aurelia-bootstrapper/dist/commonjs/aurelia-bootstrapper.js
68:13 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
Child html-webpack-plugin for "index.html":
         Asset    Size  Chunks       Chunk Names
    index.html  533 kB       0
    chunk    {0} index.html 529 kB [entry]
        [0] ./~/lodash/lodash.js 527 kB {0} [built]
        [1] (webpack)/buildin/global.js 506 bytes {0} [built]
        [2] (webpack)/buildin/module.js 548 bytes {0} [built]
        [3] ./~/html-webpack-plugin/lib/loader.js!./index.html 1.16 kB {0} [built]
Child extract-text-webpack-plugin:
    chunk    {0} extract-text-webpack-plugin-output-filename 4.67 kB [entry]
        [0] ./~/css-loader/lib/css-base.js 1.51 kB {0} [built]
        [1] ./~/css-loader!./styles/styles.css 3.16 kB {0} [built]
Child extract-text-webpack-plugin:
                                     Asset     Size  Chunks             Chunk Names
      25a32416abee198dd821b0b17a198a8f.eot  76.5 kB          [emitted]
      d7c639084f684d66a1bc66855d193ed8.svg   392 kB          [emitted]
      1dc35d25e61d819a9c357074014867ab.ttf   153 kB          [emitted]
     c8ddf1e5e5bf3682bc7bebf30f394148.woff  90.4 kB          [emitted]
    e6cf7c6ec7c2d6f670ae9d762604cb0b.woff2  71.9 kB          [emitted]
    chunk    {0} extract-text-webpack-plugin-output-filename 41.5 kB [entry]
        [0] ./~/css-loader/lib/css-base.js 1.51 kB {0} [built]
        [1] ./~/font-awesome/fonts/fontawesome-webfont.eot 82 bytes {0} [built]
        [2] ./~/font-awesome/fonts/fontawesome-webfont.eot?v=4.6.3 82 bytes {0} [built]
        [3] ./~/font-awesome/fonts/fontawesome-webfont.svg?v=4.6.3 82 bytes {0} [built]
        [4] ./~/font-awesome/fonts/fontawesome-webfont.ttf?v=4.6.3 82 bytes {0} [built]
        [5] ./~/font-awesome/fonts/fontawesome-webfont.woff?v=4.6.3 83 bytes {0} [built]
        [6] ./~/font-awesome/fonts/fontawesome-webfont.woff2?v=4.6.3 84 bytes {0} [built]
        [7] ./~/css-loader!./~/font-awesome/css/font-awesome.css 39.5 kB {0} [built]
Child extract-text-webpack-plugin:
                                     Asset     Size  Chunks             Chunk Names
      f4769f9bdb7466be65088239c12046d1.eot  20.1 kB          [emitted]
      89889688147bd7575d6327160d64e760.svg   109 kB          [emitted]
      e18bbf611f2a2e43afc071aa2f4e1512.ttf  45.4 kB          [emitted]
     fa2772327f55d8198301fdb8bcfc8158.woff  23.4 kB          [emitted]
    448c34a56d699c29117adc64c43affeb.woff2    18 kB          [emitted]
    chunk    {0} extract-text-webpack-plugin-output-filename 156 kB [entry]
        [0] ./~/bootstrap/dist/fonts/glyphicons-halflings-regular.eot 82 bytes {0} [built]
        [1] ./~/css-loader/lib/css-base.js 1.51 kB {0} [built]
        [2] ./~/bootstrap/dist/fonts/glyphicons-halflings-regular.svg 82 bytes {0} [built]
        [3] ./~/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf 82 bytes {0} [built]
        [4] ./~/bootstrap/dist/fonts/glyphicons-halflings-regular.woff 83 bytes {0} [built]
        [5] ./~/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 84 bytes {0} [built]
        [6] ./~/css-loader!./~/bootstrap/dist/css/bootstrap.css 154 kB {0} [built]
29 08 2016 18:32:44.750:INFO [karma]: Karma v1.2.0 server started at http://localhost:9876/
29 08 2016 18:32:44.752:INFO [launcher]: Launching browser Chrome with unlimited concurrency
29 08 2016 18:32:44.797:INFO [launcher]: Starting browser Chrome
29 08 2016 18:32:45.718:INFO [Chrome 54.0.2837 (Mac OS X 10.11.6)]: Connected on socket /#o73wpEZ5ypav5-fTAAAA with id 15773739
  the App module
    ✔ contains a router property
    ✔ configures the router title
    ✔ should have a welcome route
  ContentVideo
    ✖ should define video - via the ref tag
Chrome 54.0.2837 (Mac OS X 10.11.6) ContentVideo should define video - via the ref tag FAILED
        ReferenceError: type is not defined
            at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:10:42 <- spec-bundle.js:17686:122)
            at ContextKarma.loaded (http://localhost:9876/context.js:151:12)
        TypeError: Cannot read property 'create' of undefined
            at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:20:12 <- spec-bundle.js:17690:12)
            at ContextKarma.loaded (http://localhost:9876/context.js:151:12)
        TypeError: Cannot read property 'dispose' of undefined
            at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:34:12 <- spec-bundle.js:17704:12)
            at ContextKarma.loaded (http://localhost:9876/context.js:151:12)
    ✖ should define source - via the ref tag
Chrome 54.0.2837 (Mac OS X 10.11.6) ContentVideo should define source - via the ref tag FAILED
        ReferenceError: type is not defined
            at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:10:42 <- spec-bundle.js:17686:122)
            at ContextKarma.loaded (http://localhost:9876/context.js:151:12)
        TypeError: Cannot read property 'create' of undefined
            at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:27:12 <- spec-bundle.js:17697:12)
            at ContextKarma.loaded (http://localhost:9876/context.js:151:12)
        TypeError: Cannot read property 'dispose' of undefined
            at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:34:12 <- spec-bundle.js:17704:12)
            at ContextKarma.loaded (http://localhost:9876/context.js:151:12)

Finished in 0.085 secs / 0.006 secs

SUMMARY:
✔ 3 tests completed
✖ 2 tests failed

FAILED TESTS:
  ContentVideo
    ✖ should define video - via the ref tag
      Chrome 54.0.2837 (Mac OS X 10.11.6)
    ReferenceError: type is not defined
        at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:10:42 <- spec-bundle.js:17686:122)
        at ContextKarma.loaded (http://localhost:9876/context.js:151:12)
    TypeError: Cannot read property 'create' of undefined
        at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:20:12 <- spec-bundle.js:17690:12)
        at ContextKarma.loaded (http://localhost:9876/context.js:151:12)
    TypeError: Cannot read property 'dispose' of undefined
        at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:34:12 <- spec-bundle.js:17704:12)
        at ContextKarma.loaded (http://localhost:9876/context.js:151:12)

    ✖ should define source - via the ref tag
      Chrome 54.0.2837 (Mac OS X 10.11.6)
    ReferenceError: type is not defined
        at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:10:42 <- spec-bundle.js:17686:122)
        at ContextKarma.loaded (http://localhost:9876/context.js:151:12)
    TypeError: Cannot read property 'create' of undefined
        at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:27:12 <- spec-bundle.js:17697:12)
        at ContextKarma.loaded (http://localhost:9876/context.js:151:12)
    TypeError: Cannot read property 'dispose' of undefined
        at Object.<anonymous> (webpack:///test/unit/content-video.spec.js:34:12 <- spec-bundle.js:17704:12)
        at ContextKarma.loaded (http://localhost:9876/context.js:151:12)

npm ERR! Test failed.  See above for more details.
ajoslin103 commented 8 years ago

from Gitter:

Bazyli Brzóska @niieani -- as long as you have defined all your widgets as build resources, they should work. The warning message you are seeing "require function is used in a way in which dependencies cannot be statically extracted" is only that - a warning.

http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/bundling-webpack/5

Thanks!