How to use the @aurelia/testing.AuNode.createMarker function in @aurelia/testing

To help you get started, we’ve selected a few @aurelia/testing examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aurelia / aurelia / packages / __tests__ / runtime / renderer.spec.ts View on Github external
function setup() {
    const container = AuDOMConfiguration.createContainer();
    IExpressionParserRegistration.register(container as any);
    const dom = container.get(IDOM);
    const renderable: IController = {
      $bindingHead: null,
      $bindingTail: null,
      $componentHead: null,
      $componentTail: null,
      $context: null,
      $nodes: null,
      $scope: null
    };
    container.register(Registration.instance(IController, renderable));
    const target = AuNode.createMarker();

    const renderingEngine = container.get(IRenderingEngine);
    const sut = container.get(IRenderer);

    const renderContext: IRenderContext = {
      get(key) {
        return key === IRenderer ? sut : { $hydrate: spy(), key } as any;
      },
      beginComponentOperation() {
        return {
          dispose: spy()
        } as any;
      },
      createChild: PLATFORM.noop as any,
      render: PLATFORM.noop,
      has: PLATFORM.noop as any,