diff --git a/tests/unit/all.ts b/tests/unit/all.ts index dec244a1..1198aa20 100644 --- a/tests/unit/all.ts +++ b/tests/unit/all.ts @@ -13,5 +13,6 @@ import './diff'; import './RegistryHandler'; import './Injector'; import './tsx'; +import './tsxIntegration'; import './NodeHandler'; import './meta/all'; diff --git a/tests/unit/testIntegration.tsx b/tests/unit/tsxIntegration.tsx similarity index 82% rename from tests/unit/testIntegration.tsx rename to tests/unit/tsxIntegration.tsx index 60f9bc07..c2cbd5c1 100644 --- a/tests/unit/testIntegration.tsx +++ b/tests/unit/tsxIntegration.tsx @@ -1,10 +1,12 @@ import * as registerSuite from 'intern!object'; import * as assert from 'intern/chai!assert'; import { WidgetBase } from '../../src/WidgetBase'; -import { registry } from '../../src/d'; +import { Registry } from '../../src/Registry'; import { WidgetProperties } from '../../src/interfaces'; import { VNode } from '@dojo/interfaces/vdom'; -import { fromRegistry } from './../../src/tsx'; +import { tsx, fromRegistry } from './../../src/tsx'; + +const registry = new Registry(); registerSuite({ name: 'tsx', @@ -36,12 +38,16 @@ registerSuite({ } const bar = new Bar(); + bar.__setCoreProperties__({ registry }); + bar.__setProperties__({ registry }); const barRender = bar.__render__() as VNode; const barChild = barRender.children![0]; assert.equal(barRender.vnodeSelector, 'header'); assert.equal(barChild.text, 'world'); const qux = new Qux(); + qux.__setCoreProperties__({ registry }); + qux.__setProperties__({ registry }); const firstQuxRender = qux.__render__(); assert.equal(firstQuxRender, null); diff --git a/tsconfig.json b/tsconfig.json index ac83722e..56175516 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -30,6 +30,7 @@ "./src/**/*.ts", "./src/**/*.tsx", "./tests/**/*.ts", + "./tests/**/*.tsx", "./typings/index.d.ts" ] }